From d615a41c0cfee1f1e0b2271d03a5e6bee6fd754e Mon Sep 17 00:00:00 2001 From: shockrah Date: Thu, 12 Nov 2020 13:17:19 -0800 Subject: [PATCH] Messages schema now contains foreign references to channel_id; not channel_name --- server-api/migrations/2020-07-06-022319_messages/up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-api/migrations/2020-07-06-022319_messages/up.sql b/server-api/migrations/2020-07-06-022319_messages/up.sql index 29286b0..9ef2204 100644 --- a/server-api/migrations/2020-07-06-022319_messages/up.sql +++ b/server-api/migrations/2020-07-06-022319_messages/up.sql @@ -4,8 +4,8 @@ CREATE TABLE IF NOT EXISTS `messages`( `time` BIGINT NOT NULL, `content` VARCHAR(2048) NOT NULL, `author_id` BIGINT UNSIGNED NOT NULL, - `channel_name` VARCHAR(255) NOT NULL, + `channel_id` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`author_id`) REFERENCES members(`id`), - FOREIGN KEY (`channel_name`) REFERENCES channels(`name`) + FOREIGN KEY (`channel_id`) REFERENCES channels(`id`) );