feat: user-managed templates
This commit is contained in:
16
drizzle/0006_yummy_scorpion.sql
Normal file
16
drizzle/0006_yummy_scorpion.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE `templates` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`project_id` text NOT NULL,
|
||||
`slug` text NOT NULL,
|
||||
`title` text NOT NULL,
|
||||
`kind` text DEFAULT 'post' NOT NULL,
|
||||
`enabled` integer DEFAULT true NOT NULL,
|
||||
`version` integer DEFAULT 1 NOT NULL,
|
||||
`file_path` text NOT NULL,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `templates_project_slug_idx` ON `templates` (`project_id`,`slug`);--> statement-breakpoint
|
||||
ALTER TABLE `posts` ADD `template_slug` text;--> statement-breakpoint
|
||||
ALTER TABLE `tags` ADD `post_template_slug` text;
|
||||
Reference in New Issue
Block a user