Alter column operations currently support only one 'sub-operation' at a time. So, for example, changing a column's name and setting it NOT NULL within the same operation is not supported:
{
"name": "35_alter_column_multiple",
"operations": [
{
"alter_column": {
"table": "events",
"column": "name",
"name": "username",
"nullable": false,
"up": "(SELECT CASE WHEN name IS NULL THEN 'placeholder' ELSE name END)"
}
}
]
}
This migration will fail with:
alter column operations require exactly one change, found 2
Alter column operations should change to allow more than one sub-operation at at time.
Alter column operations currently support only one 'sub-operation' at a time. So, for example, changing a column's name and setting it
NOT NULL
within the same operation is not supported:This migration will fail with:
Alter column operations should change to allow more than one sub-operation at at time.