15 lines
524 B
SQL
15 lines
524 B
SQL
CREATE TABLE `posts` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`slug` text NOT NULL,
|
|
`title` text NOT NULL,
|
|
`excerpt` text,
|
|
`content` text NOT NULL,
|
|
`meta_description` text,
|
|
`status` text DEFAULT 'draft' NOT NULL,
|
|
`published_at` integer,
|
|
`updated_at` integer NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE UNIQUE INDEX `idx_posts_slug` ON `posts` (`slug`);--> statement-breakpoint
|
|
CREATE INDEX `idx_posts_published_at` ON `posts` (`published_at`);--> statement-breakpoint
|
|
CREATE INDEX `idx_posts_status` ON `posts` (`status`); |