-- The current lists of the three CHECK constraints whose values have grown -- over time, applied once to every database, including one whose copy is older -- (an image before front 7a lacks 'expedicao', for example). From now on, -- widening a list is a new migration that drops and adds that one constraint. ALTER TABLE dtf_local.operators DROP CONSTRAINT IF EXISTS operators_role; ALTER TABLE dtf_local.operators ADD CONSTRAINT operators_role CHECK (role IN ('superadmin','admin','gestao','designer','operador','revisor','vendedor','financeiro','expedicao')); ALTER TABLE dtf_local.mail_queue DROP CONSTRAINT IF EXISTS mail_queue_kind_check; ALTER TABLE dtf_local.mail_queue ADD CONSTRAINT mail_queue_kind_check CHECK(kind IN ('reset','code','account','notice','order','alert','test')); ALTER TABLE dtf_local.orders DROP CONSTRAINT IF EXISTS orders_origin_check; ALTER TABLE dtf_local.orders ADD CONSTRAINT orders_origin_check CHECK (origin IN ('site','dropflow','atendimento'));