Using `db_column_name` when adding columns to existing tables using auto migrations
Opened this issue · 1 comments
dantownsend commented
You can explicitly specify the database column name:
class MyTable(Table):
type_ = Varchar(db_column_name="type")
When using auto migrations to add such a column to an existing table, it seems like db_column_name
isn't being used.
atkei commented
@dantownsend
I think dropping a column has db_column_name
from an existing table does not work as well.
Perhaps need to set db_column_name
instead of column_name
.
https://github.com/piccolo-orm/piccolo/blob/master/piccolo/apps/migrations/auto/migration_manager.py#L668