diff --git a/database/migrations/structure/20230526_1551_events.sql b/database/migrations/structure/20230526_1551_events.sql index aae1234..1afcb66 100644 --- a/database/migrations/structure/20230526_1551_events.sql +++ b/database/migrations/structure/20230526_1551_events.sql @@ -11,8 +11,3 @@ CREATE TABLE `events` ( UNIQUE KEY `slug` (`slug`), CONSTRAINT `events_community_id` FOREIGN KEY (`community_id`) REFERENCES `communities` (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; - -ALTER TABLE `transactions` -ADD `event_id` int(10) unsigned NULL, -ADD KEY `event_id` (`event_id`) AFTER `community_id`, -ADD CONSTRAINT `transactions_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`); diff --git a/database/migrations/structure/20230528_1658_events_transactions.sql b/database/migrations/structure/20230528_1658_events_transactions.sql new file mode 100644 index 0000000..6b52226 --- /dev/null +++ b/database/migrations/structure/20230528_1658_events_transactions.sql @@ -0,0 +1,4 @@ +ALTER TABLE `transactions` +ADD `event_id` int(10) unsigned NULL AFTER `community_id`, +ADD KEY `event_id` (`event_id`), +ADD CONSTRAINT `transactions_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`);