商品已完成优化

This commit is contained in:
yml2213
2026-06-27 23:01:03 +08:00
parent fed7d6af71
commit 21aabd77f1
12 changed files with 148 additions and 10 deletions
@@ -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