Messages now has a correct reference type to author_id

Member schema just got a visual change kekw
This commit is contained in:
shockrah 2020-11-17 00:05:38 -08:00
parent 25de3eb240
commit a33e517078
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

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