CREATE TABLE `bugs` ( `id` integer PRIMARY KEY AUTOINCREMENT, `guild_id` integer NOT NULL, `actor_id` integer NOT NULL, `bug_number` integer NOT NULL, `status` text, `title` text NOT NULL, `description` text NOT NULL, `affected_projects` text DEFAULT '[]' NOT NULL, `sent` integer DEFAULT false NOT NULL, `message_id` text, `thread_id` text, `created_at` integer DEFAULT (unixepoch()) NOT NULL, `updated_at` integer DEFAULT (unixepoch()) NOT NULL, `closed_at` integer, CONSTRAINT `fk_bugs_guild_id_guilds_id_fk` FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE, CONSTRAINT `fk_bugs_actor_id_actors_id_fk` FOREIGN KEY (`actor_id`) REFERENCES `actors`(`id`) ON DELETE CASCADE );