Closed asidirop closed 3 years ago
Did you run this already against our DB and we just need the migration or shall I add the migration and then run it?
Please check the contents of the file under: database/migrations/2020_08_26_005104_add_foreign_key_to_announcements_table.php. Is this what we are looking for?
The announcement_id in attachments table should be converted to BIGINT (20) UNSIGNED, so a foreign key could be added.
ALTER TABLE
aboard
.attachments
CHANGEannouncement_id
announcement_id
BIGINT (20) UNSIGNED NOT NULL, ADD FOREIGN KEY (announcement_id
) REFERENCESaboard
.announcements
(id
) ON UPDATE CASCADE ON DELETE CASCADE;