From a33e517078c218f70d3d5048ccd2ded45dbbd5a2 Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 17 Nov 2020 00:05:38 -0800 Subject: [PATCH] Messages now has a correct reference type to author_id Member schema just got a visual change kekw --- server-api/migrations/2020-07-05-215114_members/up.sql | 2 +- server-api/migrations/2020-07-06-022319_messages/up.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server-api/migrations/2020-07-05-215114_members/up.sql b/server-api/migrations/2020-07-05-215114_members/up.sql index a76d470..9715076 100644 --- a/server-api/migrations/2020-07-05-215114_members/up.sql +++ b/server-api/migrations/2020-07-05-215114_members/up.sql @@ -1,7 +1,7 @@ -- TODO: add rate limiter in some form -- PERMISSIONS start at 0 and full perms => all F's CREATE TABLE IF NOT EXISTS `members`( - `id` bigint UNSIGNED NOT NULL auto_increment, + `id` BIGINT UNSIGNED NOT NULL auto_increment, `secret` varchar(256) NOT NULL, `name` varchar(256) NOT NULL, `joindate` bigint NOT NULL, 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 9ef2204..d97f62f 100644 --- a/server-api/migrations/2020-07-06-022319_messages/up.sql +++ b/server-api/migrations/2020-07-06-022319_messages/up.sql @@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS `messages`( `time` BIGINT NOT NULL, `content` VARCHAR(2048) NOT NULL, `author_id` BIGINT UNSIGNED NOT NULL, - `channel_id` VARCHAR(255) NOT NULL, + `channel_id` BIGINT UNSIGNED NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`author_id`) REFERENCES members(`id`), FOREIGN KEY (`channel_id`) REFERENCES channels(`id`)