martinjw/dbschemareader

PostgreSQL: Alter column does not take default values into account

Arnagos opened this issue · 2 comments

Altering columns in a PostgreSQL database does not take default values into account.
I think this is because the PostgreSqlMigrationGenerator AlterColumn method doesn't contain code to handle this.

There are potential issues with default values and changed types with USING (in #132) where PostgreSql recommends dropping the default, altering the type, then doing a set default. All of which is a bit complicated and maybe overkill for the types of alter column people actually do?