Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apps/server/drizzle/0098_workable_cardiac.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ALTER TABLE `threads` ADD `fast_mode` integer;--> statement-breakpoint
UPDATE `threads` SET `fast_mode` = `codex_fast_mode` WHERE `codex_fast_mode` IS NOT NULL;--> statement-breakpoint
CREATE TRIGGER IF NOT EXISTS `threads_codex_fast_mode_insert_sync` AFTER INSERT ON `threads`
WHEN NEW.`fast_mode` IS NULL AND NEW.`codex_fast_mode` IS NOT NULL
BEGIN
UPDATE `threads` SET `fast_mode` = NEW.`codex_fast_mode` WHERE `id` = NEW.`id`;
END;--> statement-breakpoint
CREATE TRIGGER IF NOT EXISTS `threads_codex_fast_mode_update_sync` AFTER UPDATE OF `codex_fast_mode` ON `threads`
WHEN NEW.`fast_mode` IS NOT NEW.`codex_fast_mode`
BEGIN
UPDATE `threads` SET `fast_mode` = NEW.`codex_fast_mode` WHERE `id` = NEW.`id`;
END;
Loading
Loading