"""Add spotify track and popularity Revision ID: 748c95952ff9 Revises: 167ddb39c5ee Create Date: 2016-10-16 11:59:45.577725 """ # revision identifiers, used by Alembic. revision = '748c95952ff9' down_revision = '167ddb39c5ee' 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_track_popularity', sa.Column('track_spyid', sa.String(), autoincrement=False, nullable=False), sa.Column('as_of', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('value', sa.Integer(), autoincrement=False, nullable=False), sa.PrimaryKeyConstraint('track_spyid', 'as_of') ) op.create_table('spy_tracks', 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('added_source', postgresql.JSONB(), 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') ) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_table('spy_tracks') op.drop_table('spy_track_popularity') ### end Alembic commands ###