chat.sad.ovh/drizzle/0005_round_gwen_stacy.sql
2026-01-17 20:58:32 +02:00

15 lines
No EOL
706 B
SQL

ALTER TABLE `invite` RENAME COLUMN "expires_at" TO "created_at";--> statement-breakpoint
CREATE TABLE `role` (
`id` text PRIMARY KEY NOT NULL,
`name` text NOT NULL,
`server_id` text NOT NULL,
`users` text DEFAULT '[]' NOT NULL,
`permissions` text DEFAULT '{}' NOT NULL,
`created_at` integer NOT NULL,
`created_by` text NOT NULL,
FOREIGN KEY (`server_id`) REFERENCES `server`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`created_by`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
ALTER TABLE `channel` ADD `role_overwrites` text DEFAULT '{}' NOT NULL;--> statement-breakpoint
ALTER TABLE `server` ADD `roles` text DEFAULT '[]' NOT NULL;