CREATE TABLE catalogs_apartments_favorite (
	id BIGINT UNSIGNED auto_increment NOT NULL,
	catalog_id INT(11) NOT NULL,
	apartment_id INT(11) NOT NULL,
	CONSTRAINT catalogs_apartments_favorite_PK PRIMARY KEY (id),
	CONSTRAINT catalogs_apartments_favorite_FK FOREIGN KEY (apartment_id) REFERENCES apartments(id) ON DELETE CASCADE,
	CONSTRAINT catalogs_apartments_favorite_FK_1 FOREIGN KEY (catalog_id) REFERENCES sent_catalog(id) ON DELETE CASCADE
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8
COLLATE=utf8_general_ci;