messages schema now ready to be used
This commit is contained in:
parent
f827cef9c5
commit
1944152252
1
server/migrations/2020-07-06-022319_messages/down.sql
Normal file
1
server/migrations/2020-07-06-022319_messages/down.sql
Normal file
@ -0,0 +1 @@
|
||||
DROP TABLE `messages`;
|
9
server/migrations/2020-07-06-022319_messages/up.sql
Normal file
9
server/migrations/2020-07-06-022319_messages/up.sql
Normal file
@ -0,0 +1,9 @@
|
||||
CREATE TABLE IF NOT EXISTS `messages`(
|
||||
`id` BIGINT UNSIGNED NOT NULL,
|
||||
`content` VARCHAR(2048),
|
||||
`author_id` BIGINT UNSIGNED 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`)
|
||||
);
|
Loading…
Reference in New Issue
Block a user