diff --git a/server/migrations/2020-07-06-022319_messages/up.sql b/server/migrations/2020-07-06-022319_messages/up.sql index 1674188..29286b0 100644 --- a/server/migrations/2020-07-06-022319_messages/up.sql +++ b/server/migrations/2020-07-06-022319_messages/up.sql @@ -7,5 +7,5 @@ CREATE TABLE IF NOT EXISTS `messages`( `channel_name` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`author_id`) REFERENCES members(`id`), - FOREIGN KEY (`channel_id`) REFERENCES channels(`id`) + FOREIGN KEY (`channel_name`) REFERENCES channels(`name`) );