diff --git a/app/migrations/versions/9159a6fed021_initial_haldis_support.py b/app/migrations/versions/9159a6fed021_initial_haldis_support.py index 69d3915..7bbae08 100644 --- a/app/migrations/versions/9159a6fed021_initial_haldis_support.py +++ b/app/migrations/versions/9159a6fed021_initial_haldis_support.py @@ -140,38 +140,3 @@ def upgrade(): def downgrade(): raise NotImplementedError("Downgrading to before HLDS is not supported") - - # Don't use this. It will cripple the data. - - op.alter_column("order", "courier_id", new_column_name="courrier_id", type_=sa.Integer) - op.alter_column("order_item", "comment", new_column_name="extra", - existing_type=sa.Text(), type_=sa.String(254)) - op.alter_column("order_item", "user_name", new_column_name="name", type_=sa.String(120)) - - # ### commands auto generated by Alembic - please adjust! ### - op.add_column("order_item", sa.Column("product_id", sa.INTEGER(), nullable=True)) - op.create_foreign_key(None, "order_item", "product", ["product_id"], ["id"]) - op.drop_column("order_item", "price") - op.drop_column("order_item", "hlds_data_version") - op.drop_column("order_item", "dish_name") - op.drop_column("order_item", "dish_id") - op.create_foreign_key(None, "order", "location", ["location_id"], ["id"]) - op.drop_column("order", "location_name") - op.create_table("location", - sa.Column("id", sa.INTEGER(), nullable=False), - sa.Column("name", sa.VARCHAR(length=120), nullable=False), - sa.Column("address", sa.VARCHAR(length=254), nullable=True), - sa.Column("website", sa.VARCHAR(length=120), nullable=True), - sa.Column("telephone", sa.VARCHAR(length=20), nullable=True), - sa.PrimaryKeyConstraint("id") - ) - op.create_table("product", - sa.Column("id", sa.INTEGER(), nullable=False), - sa.Column("location_id", sa.INTEGER(), nullable=True), - sa.Column("name", sa.VARCHAR(length=120), nullable=False), - sa.Column("price", sa.INTEGER(), nullable=False), - sa.ForeignKeyConstraint(["location_id"], ["location.id"], ), - sa.PrimaryKeyConstraint("id") - ) - op.drop_table("order_item_choice") - # ### end Alembic commands ###