"""tiktok_sounds Revision ID: 89b37a7beffb Revises: 4eb679fb4fd0 Create Date: 2019-06-19 08:59:55.064236 """ # revision identifiers, used by Alembic. revision = '89b37a7beffb' down_revision = '4eb679fb4fd0' 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('tiktok_sounds', sa.Column('ttid', sa.String(), nullable=False), sa.Column('title', sa.String(), nullable=False), sa.Column('author', sa.String(), nullable=True), sa.Column('last_visited', sa.DateTime(), nullable=True), sa.Column('last_posts', sa.BigInteger(), nullable=True), sa.Column('cover_image_url', sa.String(), nullable=True), sa.PrimaryKeyConstraint('ttid') ) op.create_table('tiktok_sound_stats', sa.Column('ttid', sa.String(), nullable=False), sa.Column('as_of', sa.Date(), nullable=False), sa.Column('posts', sa.BigInteger(), nullable=False), sa.ForeignKeyConstraint(['ttid'], ['tiktok_sounds.ttid'], ), sa.PrimaryKeyConstraint('ttid', 'as_of') ) def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_table('tiktok_sound_stats') op.drop_table('tiktok_sounds') ### end Alembic commands ###