30 lines
		
	
	
		
			918 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			918 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
| CREATE TABLE IF NOT EXISTS `audio_clips` (
 | |
| 	`id` varchar(36) NOT NULL,
 | |
| 	`post_id` varchar(36) NOT NULL,
 | |
| 	`bucket` varchar(128) NOT NULL,
 | |
| 	`object_key` text NOT NULL,
 | |
| 	`mime` varchar(64) NOT NULL,
 | |
| 	`transcript` text,
 | |
| 	`duration_ms` int,
 | |
| 	`created_at` datetime(3) NOT NULL,
 | |
| 	CONSTRAINT `audio_clips_id` PRIMARY KEY(`id`)
 | |
| );
 | |
| --> statement-breakpoint
 | |
| CREATE TABLE IF NOT EXISTS `posts` (
 | |
| 	`id` varchar(36) NOT NULL,
 | |
| 	`title` varchar(255),
 | |
| 	`content_html` text NOT NULL,
 | |
| 	`tags_text` text,
 | |
| 	`feature_image` text,
 | |
| 	`canonical_url` text,
 | |
| 	`status` enum('inbox','editing','ready_for_publish','published','archived') NOT NULL DEFAULT 'editing',
 | |
| 	`ghost_post_id` varchar(64),
 | |
| 	`ghost_url` text,
 | |
| 	`version` int NOT NULL DEFAULT 1,
 | |
| 	`created_at` datetime(3) NOT NULL,
 | |
| 	`updated_at` datetime(3) NOT NULL,
 | |
| 	CONSTRAINT `posts_id` PRIMARY KEY(`id`)
 | |
| );
 | |
| 
 | |
| --> statement-breakpoint
 | |
| ALTER TABLE `posts` ADD COLUMN `prompt` MEDIUMTEXT NULL; |