"""kworb_ranked_artists Revision ID: 61116887de2a Revises: 99163f964efb Create Date: 2020-06-23 11:21:37.697759 """ # revision identifiers, used by Alembic. revision = '61116887de2a' down_revision = '99163f964efb' 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('kworb_ranked_artists', sa.Column('slug', sa.String(), nullable=False), sa.Column('name', sa.String(), nullable=False), sa.Column('first_seen', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('last_seen', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('last_score', sa.Float(), nullable=False), sa.Column('last_rank', sa.Integer(), nullable=False), sa.PrimaryKeyConstraint('slug') ) op.create_table('kworb_ranked_artist_history', sa.Column('slug', sa.String(), nullable=False), sa.Column('as_of', sa.Date(), nullable=False), sa.Column('score', sa.Float(), nullable=False), sa.Column('rank', sa.Integer(), nullable=False), sa.ForeignKeyConstraint(['slug'], ['kworb_ranked_artists.slug'], ), sa.PrimaryKeyConstraint('slug', 'as_of') ) def downgrade(): op.drop_table('kworb_ranked_artist_history') op.drop_table('kworb_ranked_artists') # ### end Alembic commands ###