"""yt_video_spyid Revision ID: 6ba483c0af4b Revises: e5873c5fd326 Create Date: 2019-01-10 15:20:06.654823 """ # revision identifiers, used by Alembic. revision = '6ba483c0af4b' down_revision = 'e5873c5fd326' 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.add_column('yt_videos', sa.Column('artist_spyid', sa.String(), nullable=True)) op.add_column('yt_videos', sa.Column('track_spyid', sa.String(), nullable=True)) op.create_foreign_key('fk_yt_videos_spy_artists', 'yt_videos', 'spy_artists', ['artist_spyid'], ['spyid']) op.create_foreign_key('fk_yt_videos_spy_tracks', 'yt_videos', 'spy_tracks', ['track_spyid'], ['spyid']) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_constraint('fk_yt_videos_spy_artists', 'yt_videos', type_='foreignkey') op.drop_constraint('fk_yt_videos_spy_tracks', 'yt_videos', type_='foreignkey') op.drop_column('yt_videos', 'track_spyid') op.drop_column('yt_videos', 'artist_spyid') ### end Alembic commands ###