Skip to content

Instantly share code, notes, and snippets.

@kaniak274
Last active October 19, 2020 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaniak274/2ab79a9f7d75add2b32252441a08d7f8 to your computer and use it in GitHub Desktop.
Save kaniak274/2ab79a9f7d75add2b32252441a08d7f8 to your computer and use it in GitHub Desktop.
Migration example for the enum article
...
def upgrade():
op.create_table('transactions',
sa.Column('id', sa.Integer, nullable=False),
sa.Column('status', sa.Enum('STARTED', 'ACCEPTED', name='status'), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('transactions')
@IwoHerka
Copy link

Formatting is a bit off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment