"""Add spotify playlist Revision ID: 834fdb196094 Revises: 748c95952ff9 Create Date: 2016-10-22 11:27:54.494154 """ # revision identifiers, used by Alembic. revision = '834fdb196094' down_revision = '748c95952ff9' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('spy_playlist', sa.Column('spyid', sa.String(), nullable=False), sa.Column('user', sa.String(), nullable=False), sa.Column('added', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), sa.Column('last_visited', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('spyid') ) op.create_table('spy_playlist_track', sa.Column('playlist_spyid', sa.String(), nullable=False), sa.Column('track_spyid', sa.String(), nullable=False), sa.Column('added_at', sa.DateTime(), nullable=False), sa.Column('first_seen', sa.DateTime(), nullable=False), sa.Column('last_seen', sa.DateTime(), nullable=False), sa.Column('first_position', sa.Integer(), nullable=False), sa.Column('last_position', sa.Integer(), nullable=False), sa.PrimaryKeyConstraint('playlist_spyid', 'track_spyid') ) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_table('spy_playlist_track') op.drop_table('spy_playlist') ### end Alembic commands ###