Skip to content

Instantly share code, notes, and snippets.

@jean
Created May 5, 2015 04:11
Show Gist options
  • Save jean/862408a974c28502a01e to your computer and use it in GitHub Desktop.
Save jean/862408a974c28502a01e to your computer and use it in GitHub Desktop.
"""empty message
Revision ID: 1c839cbdeb51
Revises: None
Create Date: 2015-05-05 04:08:56.274253
"""
# revision identifiers, used by Alembic.
revision = '1c839cbdeb51'
down_revision = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('users')
[...]
op.drop_table('domains')
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('domains',
sa.Column('id', sa.INTEGER(), server_default=sa.text(u"nextval('domains_id_seq'::regclass)"), nullable=False),
[...]
)
op.create_table('users',
sa.Column('id', sa.INTEGER(), nullable=False),
[...]
sa.PrimaryKeyConstraint('id', name=u'users_pkey')
)
### end Alembic commands ###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment