# 1. install alembic - time of writing current version used - alembic 1.7.5
# 3. Update alemnic.ini file with db connection details, for example:
# 4. Edit alembic/env.py and add the following:
target_metadata = Base.metadata
#5. For existing db generate first migration and add your stuff, so create migration manually, by running:
alembic revision -m "First migration"
# 6. After above commend yuo will have a new versioned fiele in versions directory, for example: bf35c09ac2e3
# edit file and add your changes, for example we want to add new columns:
op.add_column('test_table', sa.Column('column_name', sa.String(255)))
op.drop_column('test_table', 'column_name')
# 7. Run migrations with command:
# For future you will generate new migrations with automatic migrations:
alembic revision --autogenerate -m "Add new columns"