@crewx/sdk 0.9.0-rc.203 → 0.9.0-rc.205

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ DROP INDEX `idx_route_decisions_created`;--> statement-breakpoint
2
+ DROP INDEX `uniq_route_task_decision`;--> statement-breakpoint
3
+ ALTER TABLE `route_decisions` ADD `workspace_key` text DEFAULT 'legacy' NOT NULL;--> statement-breakpoint
4
+ CREATE INDEX IF NOT EXISTS `idx_route_decisions_workspace_created` ON `route_decisions` (`workspace_key`,`route_id`,`created_at`);--> statement-breakpoint
5
+ CREATE UNIQUE INDEX IF NOT EXISTS `uniq_route_task_decision` ON `route_decisions` (`workspace_key`,`route_id`,`task_id`);--> statement-breakpoint
6
+ DROP INDEX `uniq_route_sticky_thread`;--> statement-breakpoint
7
+ DROP INDEX `idx_route_sticky_candidate`;--> statement-breakpoint
8
+ ALTER TABLE `route_sticky_bindings` ADD `workspace_key` text DEFAULT 'legacy' NOT NULL;--> statement-breakpoint
9
+ CREATE UNIQUE INDEX IF NOT EXISTS `uniq_route_sticky_thread` ON `route_sticky_bindings` (`workspace_key`,`route_id`,`thread_id`);--> statement-breakpoint
10
+ CREATE INDEX IF NOT EXISTS `idx_route_sticky_candidate` ON `route_sticky_bindings` (`workspace_key`,`route_id`,`candidate_id`);--> statement-breakpoint
11
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
12
+ CREATE TABLE IF NOT EXISTS `__new_route_states` (
13
+ `workspace_key` text DEFAULT 'legacy' NOT NULL,
14
+ `route_id` text NOT NULL,
15
+ `config_revision` text NOT NULL,
16
+ `state_json` text NOT NULL,
17
+ `revision` integer DEFAULT 0 NOT NULL,
18
+ `updated_at` text NOT NULL,
19
+ PRIMARY KEY(`workspace_key`, `route_id`)
20
+ );
21
+ --> statement-breakpoint
22
+ INSERT INTO `__new_route_states`("workspace_key", "route_id", "config_revision", "state_json", "revision", "updated_at") SELECT 'legacy', "route_id", "config_revision", "state_json", "revision", "updated_at" FROM `route_states`;--> statement-breakpoint
23
+ DROP TABLE `route_states`;--> statement-breakpoint
24
+ ALTER TABLE `__new_route_states` RENAME TO `route_states`;--> statement-breakpoint
25
+ PRAGMA foreign_keys=ON;