Fix: Upgrade failed when multiple skus
This commit is contained in:
parent
49aaa2fbe3
commit
7a5ccdfbbb
@ -37,7 +37,9 @@ def upgrade():
|
||||
column("fraction_units", Unicode(255)),
|
||||
)
|
||||
op.execute(
|
||||
product.update().values(fraction_units=select(sku.c.fraction_units).where(sku.c.product_id == product.c.id))
|
||||
product.update().values(
|
||||
fraction_units=select(sku.c.fraction_units).where(sku.c.product_id == product.c.id).limit(1)
|
||||
)
|
||||
)
|
||||
|
||||
op.drop_index("unique_true_is_default", table_name="stock_keeping_units")
|
||||
|
Loading…
Reference in New Issue
Block a user