Remove all "WPS" codes
This commit is contained in:
parent
8a5a652b3e
commit
9fcb3c8c14
3 changed files with 171 additions and 254 deletions
|
|
@ -38,7 +38,7 @@ def upgrade():
|
|||
sa.Column('initial_zoom', sa.SmallInteger(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_cities')),
|
||||
*(
|
||||
[ # noqa:WPS504
|
||||
[
|
||||
sa.ForeignKeyConstraint(
|
||||
['id'],
|
||||
[f'{config.ORIGINAL_SCHEMA}.cities.id'],
|
||||
|
|
@ -83,7 +83,7 @@ def upgrade():
|
|||
),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_couriers')),
|
||||
*(
|
||||
[ # noqa:WPS504
|
||||
[
|
||||
sa.ForeignKeyConstraint(
|
||||
['id'],
|
||||
[f'{config.ORIGINAL_SCHEMA}.couriers.id'],
|
||||
|
|
@ -148,7 +148,7 @@ def upgrade():
|
|||
),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_addresses')),
|
||||
*(
|
||||
[ # noqa:WPS504
|
||||
[
|
||||
sa.ForeignKeyConstraint(
|
||||
['id'],
|
||||
[f'{config.ORIGINAL_SCHEMA}.addresses.id'],
|
||||
|
|
@ -210,7 +210,7 @@ def upgrade():
|
|||
),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_restaurants')),
|
||||
*(
|
||||
[ # noqa:WPS504
|
||||
[
|
||||
sa.ForeignKeyConstraint(
|
||||
['id'],
|
||||
[f'{config.ORIGINAL_SCHEMA}.businesses.id'],
|
||||
|
|
@ -628,7 +628,7 @@ def upgrade():
|
|||
),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_orders')),
|
||||
*(
|
||||
[ # noqa:WPS504
|
||||
[
|
||||
sa.ForeignKeyConstraint(
|
||||
['id'],
|
||||
[f'{config.ORIGINAL_SCHEMA}.orders.id'],
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ def upgrade():
|
|||
TO
|
||||
train_horizon;
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
|
|
@ -45,4 +45,4 @@ def downgrade():
|
|||
TO
|
||||
training_horizon;
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ def upgrade():
|
|||
ALTER TABLE {config.CLEAN_SCHEMA}.orders
|
||||
DROP CONSTRAINT ck_orders_on_ordered_timestamps_21;
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
|
||||
# Add forgotten check constraints to the `orders` table.
|
||||
op.execute(
|
||||
|
|
@ -38,7 +38,7 @@ def upgrade():
|
|||
ADD CONSTRAINT check_orders_on_ordered_timestamps_placed_at_before_pickup_at
|
||||
CHECK (placed_at < pickup_at);
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
op.execute(
|
||||
f"""
|
||||
ALTER TABLE {config.CLEAN_SCHEMA}.orders
|
||||
|
|
@ -55,7 +55,7 @@ def upgrade():
|
|||
)
|
||||
);
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
|
||||
# This `UniqueConstraint` is needed by the `replayed_orders` table below.
|
||||
op.create_unique_constraint(
|
||||
|
|
@ -403,17 +403,17 @@ def downgrade():
|
|||
ALTER TABLE {config.CLEAN_SCHEMA}.orders
|
||||
DROP CONSTRAINT check_orders_on_scheduled_orders_must_be_at_quarters_of_an_hour;
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
op.execute(
|
||||
f"""
|
||||
ALTER TABLE {config.CLEAN_SCHEMA}.orders
|
||||
DROP CONSTRAINT check_orders_on_ordered_timestamps_placed_at_before_pickup_at;
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
op.execute(
|
||||
f"""
|
||||
ALTER TABLE {config.CLEAN_SCHEMA}.orders
|
||||
ADD CONSTRAINT ck_orders_on_ordered_timestamps_21
|
||||
CHECK (cancelled_at > delivery_at);
|
||||
""",
|
||||
) # noqa:WPS355
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue