fix(playback): freeze v3 seek reanchor recipes (#548)
* fix(playback): freeze v3 seek reanchor recipes * fix(playback): address v3 recipe review feedback * test(playback): isolate v3 fallback route fixture * fix(database): split v3 recipe constraint validation * fix(playback): preserve frozen seek recipe identity --------- Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
-- +goose Up
|
||||
ALTER TABLE playback_v3_attempts
|
||||
ADD COLUMN frozen_recipe JSONB NOT NULL DEFAULT '{}'::jsonb;
|
||||
|
||||
ALTER TABLE playback_v3_attempts
|
||||
ADD CONSTRAINT playback_v3_attempts_frozen_recipe_object
|
||||
CHECK (jsonb_typeof(frozen_recipe) = 'object') NOT VALID;
|
||||
|
||||
-- +goose Down
|
||||
ALTER TABLE playback_v3_attempts
|
||||
DROP CONSTRAINT IF EXISTS playback_v3_attempts_frozen_recipe_object,
|
||||
DROP COLUMN IF EXISTS frozen_recipe;
|
||||
@@ -0,0 +1,8 @@
|
||||
-- +goose Up
|
||||
ALTER TABLE playback_v3_attempts
|
||||
VALIDATE CONSTRAINT playback_v3_attempts_frozen_recipe_object;
|
||||
|
||||
-- +goose Down
|
||||
-- PostgreSQL cannot mark a validated CHECK constraint NOT VALID again. The
|
||||
-- preceding migration's Down step drops the constraint with its column.
|
||||
SELECT 1;
|
||||
Reference in New Issue
Block a user