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