add group, server and friends to db
This commit is contained in:
parent
91284c242a
commit
37ae49b66e
6 changed files with 426 additions and 8 deletions
18
drizzle/0003_wise_lucky_pierre.sql
Normal file
18
drizzle/0003_wise_lucky_pierre.sql
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
CREATE TABLE `group` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`owner` text NOT NULL,
|
||||
`members` text DEFAULT '[]' NOT NULL,
|
||||
FOREIGN KEY (`owner`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `server` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`owner` text NOT NULL,
|
||||
`members` text DEFAULT '[]' NOT NULL,
|
||||
`channels` text DEFAULT '[]' NOT NULL,
|
||||
FOREIGN KEY (`owner`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `user` DROP COLUMN `age`;
|
||||
Loading…
Add table
Add a link
Reference in a new issue