"""Add spy artist data Revision ID: 382c2f77a9b3 Revises: b91cd1558df0 Create Date: 2016-11-26 10:19:11.179460 """ # revision identifiers, used by Alembic. revision = '382c2f77a9b3' down_revision = 'b91cd1558df0' 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('spy_artists', sa.Column('spyid', sa.String(), autoincrement=False, 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('last_updated', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('data', postgresql.JSONB(), nullable=True), sa.PrimaryKeyConstraint('spyid') ) op.create_table('spy_artist_metrics', sa.Column('artist_spyid', sa.String(), autoincrement=False, nullable=False), sa.Column('as_of', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('popularity', sa.Integer(), autoincrement=False, nullable=False), sa.Column('followers', sa.Integer(), autoincrement=False, nullable=False), sa.PrimaryKeyConstraint('artist_spyid', 'as_of') ) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_table('spy_artists_metrics') op.drop_table('spy_artists') ### end Alembic commands ###