"""bandsintown; Revision ID: cc6126290cc3 Revises: 8fcb1ca23d49 Create Date: 2019-10-18 14:22:51.374304 """ # revision identifiers, used by Alembic. revision = 'cc6126290cc3' down_revision = '8fcb1ca23d49' 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('bands_in_town_artists', sa.Column('btid', sa.String(), nullable=False), sa.Column('name', sa.String(), nullable=True), sa.Column('first_seen', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('spotify_url', sa.String(), nullable=True), sa.Column('last_visited', sa.DateTime(), nullable=True), sa.Column('last_tracker_count', sa.Integer(), nullable=True), sa.Column('last_emww_rank', sa.Integer(), nullable=True), sa.PrimaryKeyConstraint('btid') ) op.create_table('bands_in_town_artist_stats', sa.Column('btid', sa.String(), nullable=False), sa.Column('as_of', sa.Date(), nullable=False), sa.Column('tracker_count', sa.Integer(), nullable=False), sa.Column('emww_rank', sa.Integer(), nullable=True), sa.Column('emww_last_week', sa.Integer(), nullable=True), sa.Column('emww_last_month', sa.Integer(), nullable=True), sa.Column('emww_variation', sa.Integer(), nullable=True), sa.ForeignKeyConstraint(['btid'], ['bands_in_town_artists.btid'], ), sa.PrimaryKeyConstraint('btid', 'as_of') ) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_table('bands_in_town_artist_stats') op.drop_table('bands_in_town_artists') ### end Alembic commands ###