Files
nekonest-cloud/drizzle/0005_pale_corsair.sql
T

16 lines
691 B
SQL

CREATE TABLE `beta_feedback` (
`id` text PRIMARY KEY NOT NULL,
`account_id` text NOT NULL,
`category` text NOT NULL,
`message` text NOT NULL,
`status` text DEFAULT 'open' NOT NULL,
`admin_response` text,
`handled_by` text,
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`resolved_at` text,
FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
CREATE INDEX `idx_beta_feedback_account_time` ON `beta_feedback` (`account_id`,`created_at`);--> statement-breakpoint
CREATE INDEX `idx_beta_feedback_status_time` ON `beta_feedback` (`status`,`created_at`);