Closed andrew-farries closed 4 months ago
Allow 'alter column' operations to include multiple sub-operations. This means migrations like this one are now possible:
{ "name": "35_alter_column_multiple", "operations": [ { "alter_column": { "table": "events", "column": "name", "name": "event_name", "type": "text", "nullable": false, "unique": { "name": "events_event_name_unique" }, "check": { "name": "event_name_length", "constraint": "length(name) > 3" }, "up": "(SELECT CASE WHEN name IS NULL THEN 'placeholder' ELSE name END)", "down": "name" } } ] }
This 'alter column' operation:
NOT NULL
Previously, this would have required 5 different operations.
Builds on https://github.com/xataio/pgroll/pull/337. Fixes https://github.com/xataio/pgroll/issues/336
Allow 'alter column' operations to include multiple sub-operations. This means migrations like this one are now possible:
This 'alter column' operation:
NOT NULL
Previously, this would have required 5 different operations.
Builds on https://github.com/xataio/pgroll/pull/337. Fixes https://github.com/xataio/pgroll/issues/336