"""create_price_table Revision ID: 1e8d27922f56 Revises: 9254559dcac2 Create Date: 2018-05-28 13:30:54.227839 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "1e8d27922f56" down_revision = "9254559dcac2" branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table( "price", sa.Column("datetime", sa.DateTime(timezone=True), nullable=False), sa.Column("market_id", sa.Integer(), nullable=False), sa.Column("value", sa.Float(), nullable=False), sa.ForeignKeyConstraint(["market_id"], ["market.id"]), sa.PrimaryKeyConstraint("datetime", "market_id"), ) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_table("price") # ### end Alembic commands ###