Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
alter_table
set NOT NULL
operations with `create_…
…table` operations (#608) Ensure that multi-operation migrations combining `alter_column` `SET NOT NULL` and `create_table` operations work as expected. ```json { "name": "06_multi_operation", "operations": [ { "create_table": { "name": "items", "columns": [ { "name": "id", "type": "serial", "pk": true }, { "name": "name", "type": "text", "nullable": true } ] } }, { "alter_column": { "table": "items", "column": "name", "nullable": false, "up": "SELECT CASE WHEN name IS NULL THEN 'anonymous' ELSE name END", "down": "name || '_from_down_trigger'" } } ] } ``` This migration creates a table and then sets a column's `nullability`. Previously the migration would fail as the `alter_column` operation was unaware of the changes made by the preceding operation. Part of #239
- Loading branch information