I'm using SQLAlchemy-migrate 0.6.1 to handle versioning of my mysql database. The link points to the documentation. But they seem to have removed the docs for 0.6.1.
I'm trying to add a new column with a foreignkey constraint to a table like this:
fk = Column('fk',CHAR(36),ForeignKey('table_b.id'),server_default='11c137c0-ee7e-4f9c-91c5-8c77cec22b2c',nullable=False)
fk.create(table_a)
This works, except that mysql will store the server_default as a default value and add it to all new records. In my case, this default value will not stay the same.
I want to populate the column with the default, but not store it as the default in mysql.
I found this in the documentation:
fk = Column('fk',CHAR(36),ForeignKey('table_b.id'),default='11c137c0-ee7e-4f9c-91c5-8c77cec22b2c',nullable=False)
fk.create(table_a, populate_default=True)
But I suspect that it's added in a more recent version of sqlalchemy-migrate. Anyone knows if this is possible in the 0.6.1 version of sqlalchemy-migrate?