43 lines
1.2 KiB
SQL
43 lines
1.2 KiB
SQL
CREATE TABLE `banner_images` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`image_path` text NOT NULL,
|
|
`sort_order` integer DEFAULT 0 NOT NULL,
|
|
`created_at` integer NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `news_posts` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`title` text NOT NULL,
|
|
`slug` text NOT NULL,
|
|
`excerpt` text,
|
|
`body` text DEFAULT '' NOT NULL,
|
|
`cover_image_path` text,
|
|
`published` integer DEFAULT false NOT NULL,
|
|
`published_at` integer,
|
|
`created_at` integer NOT NULL,
|
|
`updated_at` integer NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE UNIQUE INDEX `news_posts_slug_unique` ON `news_posts` (`slug`);--> statement-breakpoint
|
|
CREATE TABLE `service_images` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`service_id` text NOT NULL,
|
|
`image_path` text NOT NULL,
|
|
`sort_order` integer DEFAULT 0 NOT NULL,
|
|
FOREIGN KEY (`service_id`) REFERENCES `services`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `services` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`title` text NOT NULL,
|
|
`description` text,
|
|
`bullets` text,
|
|
`sort_order` integer DEFAULT 0 NOT NULL,
|
|
`created_at` integer NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `settings` (
|
|
`key` text PRIMARY KEY NOT NULL,
|
|
`value` text NOT NULL
|
|
);
|