xataio / pgroll

PostgreSQL zero-downtime migrations made easy
https://www.xata.io
Apache License 2.0
2.97k stars 54 forks source link

Make `down` SQL in rename column operations use the new name of the column #354

Closed andrew-farries closed 3 months ago

andrew-farries commented 4 months ago

Ensure that 'alter column' operations that rename a column and also specify down SQL (such as those that alter some other column attribute at the time of the rename) must use the new name of the column in the down SQL.

Without this change, the down SQL would require the use of the old column name.

Fixes #350