diff --git a/internal/db/migrations/000008_make_uuid_required.down.sql b/internal/db/migrations/000008_make_uuid_required.down.sql new file mode 100644 index 0000000..91fa637 --- /dev/null +++ b/internal/db/migrations/000008_make_uuid_required.down.sql @@ -0,0 +1,7 @@ +-- Rollback: Make UUID columns nullable again + +-- Make UUID nullable on soundtrack +ALTER TABLE soundtrack ALTER COLUMN uuid DROP NOT NULL; + +-- Make UUID nullable on song +ALTER TABLE song ALTER COLUMN uuid DROP NOT NULL; diff --git a/internal/db/migrations/000008_make_uuid_required.up.sql b/internal/db/migrations/000008_make_uuid_required.up.sql new file mode 100644 index 0000000..cf60e09 --- /dev/null +++ b/internal/db/migrations/000008_make_uuid_required.up.sql @@ -0,0 +1,7 @@ +-- Migration: Make UUID columns NOT NULL + +-- Make UUID required on soundtrack +ALTER TABLE soundtrack ALTER COLUMN uuid SET NOT NULL; + +-- Make UUID required on song +ALTER TABLE song ALTER COLUMN uuid SET NOT NULL;