Merge pull request 'fix sql statement for table transactions' (!55) from bugfix/fix-buggy-migration into master
All checks were successful
rvr-nextgen/pipeline/head This commit looks good

Reviewed-on: #55
This commit is contained in:
Bence Pőcze 2023-05-28 17:03:11 +02:00 committed by Gitea
commit e122248a97
Signed by: Gitea
GPG Key ID: 7B89B83EED9AD2C6
2 changed files with 4 additions and 5 deletions

View File

@ -11,8 +11,3 @@ CREATE TABLE `events` (
UNIQUE KEY `slug` (`slug`), UNIQUE KEY `slug` (`slug`),
CONSTRAINT `events_community_id` FOREIGN KEY (`community_id`) REFERENCES `communities` (`id`) CONSTRAINT `events_community_id` FOREIGN KEY (`community_id`) REFERENCES `communities` (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; ) 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`);

View File

@ -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`);