CREATE TABLE `jobs` ( `id` text PRIMARY KEY NOT NULL, `team_id` text NOT NULL, `no` integer NOT NULL, `title` text NOT NULL, `plan` text DEFAULT '' NOT NULL, `status` text DEFAULT 'running' NOT NULL, `summary` text, `files` text DEFAULT '[]' NOT NULL, `blocked_by` text, `limits` text NOT NULL, `lead_runs` integer DEFAULT 0 NOT NULL, `run_ids` text DEFAULT '[]' NOT NULL, `created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')) NOT NULL, `ended_at` text ); --> statement-breakpoint CREATE INDEX `jobs_team_idx` ON `jobs` (`team_id`,`no`);--> statement-breakpoint CREATE TABLE `tasks` ( `id` text PRIMARY KEY NOT NULL, `job_id` text NOT NULL, `team_id` text NOT NULL, `no` integer NOT NULL, `bot_id` text NOT NULL, `title` text NOT NULL, `instructions` text NOT NULL, `depends_on` text DEFAULT '[]' NOT NULL, `status` text NOT NULL, `result` text, `files` text DEFAULT '[]' NOT NULL, `run_id` text, `session_id` text, `created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')) NOT NULL, `started_at` text, `ended_at` text ); --> statement-breakpoint CREATE INDEX `tasks_team_idx` ON `tasks` (`team_id`,`no`);--> statement-breakpoint CREATE INDEX `tasks_job_idx` ON `tasks` (`job_id`);--> statement-breakpoint ALTER TABLE `teams` ADD `limits` text;--> statement-breakpoint ALTER TABLE `teams` ADD `debug` text DEFAULT '{"stepMode":false,"stubBotIds":[]}' NOT NULL;