feat(blog): drizzle migration 0008 — blog_posts table
Generated for the blog_posts schema added in the previous commit. Applied on deploy by start.sh (db:migrate). CREATE TABLE + 3 indexes only; no changes to existing tables. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
18
apps/api/drizzle/0008_common_sumo.sql
Normal file
18
apps/api/drizzle/0008_common_sumo.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE "blog_posts" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"slug" varchar(180) NOT NULL,
|
||||
"title" varchar(255) NOT NULL,
|
||||
"meta_description" varchar(320),
|
||||
"body_markdown" text NOT NULL,
|
||||
"tags" jsonb DEFAULT '[]'::jsonb NOT NULL,
|
||||
"cover_image" varchar(500),
|
||||
"status" varchar(20) DEFAULT 'published' NOT NULL,
|
||||
"source" varchar(20) DEFAULT 'panel' NOT NULL,
|
||||
"published_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "blog_posts_slug_idx" ON "blog_posts" USING btree ("slug");--> statement-breakpoint
|
||||
CREATE INDEX "blog_posts_published_at_idx" ON "blog_posts" USING btree ("published_at");--> statement-breakpoint
|
||||
CREATE INDEX "blog_posts_status_idx" ON "blog_posts" USING btree ("status");
|
||||
5544
apps/api/drizzle/meta/0008_snapshot.json
Normal file
5544
apps/api/drizzle/meta/0008_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -57,6 +57,13 @@
|
||||
"when": 1779573406942,
|
||||
"tag": "0007_natural_red_wolf",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 8,
|
||||
"version": "7",
|
||||
"when": 1779633572753,
|
||||
"tag": "0008_common_sumo",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user