ente/server/migrations/56_add_uncategorized_type_constraint.up.sql
2024-03-01 13:37:01 +05:30

4 lines
315 B
SQL

-- Migration script for collections with bad type due to bug on mobile client & missing validation on server
update collections set type='album' where type='CollectionType.album';
CREATE UNIQUE INDEX IF NOT EXISTS collections_uncategorized_constraint_index ON collections (owner_id) WHERE (type = 'uncategorized');