"""Add insta Revision ID: 15b4dbd93f9d Revises: 8acf7a594845 Create Date: 2017-06-16 23:40:36.356586 """ # revision identifiers, used by Alembic. revision = '15b4dbd93f9d' down_revision = '8acf7a594845' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('in_user', sa.Column('inid', sa.String(length=64), nullable=False), sa.Column('first_seen', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('page_data', postgresql.JSONB(), nullable=True), sa.Column('data_last_updated', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('inid') ) op.create_table('in_follows', sa.Column('first_seen', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('followed_by_inid', sa.String(length=64), nullable=False), sa.Column('followee_inid', sa.String(length=64), nullable=False), sa.ForeignKeyConstraint(['followed_by_inid'], ['in_user.inid'], ), sa.ForeignKeyConstraint(['followee_inid'], ['in_user.inid'], ), sa.PrimaryKeyConstraint('followed_by_inid', 'followee_inid') ) op.create_index(op.f('ix_in_follows_first_seen'), 'in_follows', ['first_seen'], unique=False) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_in_follows_first_seen'), table_name='in_follows') op.drop_table('in_follows') op.drop_table('in_user') ### end Alembic commands ###