商品已完成优化
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
|
||||
UPDATE rental_listings l
|
||||
JOIN rental_orders o ON o.listing_id = l.id
|
||||
SET l.status = 'completed',
|
||||
l.in_transaction = 0,
|
||||
l.published_at = NULL
|
||||
WHERE o.status = 'completed'
|
||||
AND l.status = 'offline';
|
||||
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
|
||||
UPDATE rental_listings l
|
||||
JOIN rental_orders o ON o.listing_id = l.id
|
||||
SET l.status = 'offline',
|
||||
l.in_transaction = 0,
|
||||
l.published_at = NULL
|
||||
WHERE o.status = 'completed'
|
||||
AND l.status = 'completed';
|
||||
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user