You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated issue, originally created by Lucas Kahlert (@f3anor)
If you create add a column incl. a foreign key with a batch operation, e.g.
with op.batch_alter_table('quest') as batch_op:
batch_op.add_column(sa.Column('therapist_id', sa.String(255), nullable=True))
batch_op.create_foreign_key('fk_quest_therapist_id_user', 'user', ['therapist_id'], ['username'])
but the referenced table (user) was already created, because there is another column in quest referring to user, the upgrade command will produce the follwing error:
InvalidRequestError: Table 'user' is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object.
The text was updated successfully, but these errors were encountered:
Migrated issue, originally created by Lucas Kahlert (@f3anor)
If you create add a column incl. a foreign key with a batch operation, e.g.
but the referenced table (
user
) was already created, because there is another column inquest
referring touser
, the upgrade command will produce the follwing error:The text was updated successfully, but these errors were encountered: