ALTER TABLE `task_run` ADD `stage` text NOT NULL DEFAULT 'queued';
--> statement-breakpoint
ALTER TABLE `task_run` ADD `stage_detail` text;
--> statement-breakpoint
ALTER TABLE `task_run` ADD `resource_key` text;
--> statement-breakpoint
ALTER TABLE `task_run` ADD `notification_read_at` text;
--> statement-breakpoint
ALTER TABLE `task_run` ADD `notification_silenced_at` text;
--> statement-breakpoint
CREATE INDEX `task_user_resource_status_idx` ON `task_run` (`user_id`,`task_type`,`resource_key`,`status`,`created_at`);
