feat(M04-B): 完成订单状态机与迁移历史

This commit is contained in:
Codex
2026-06-20 13:53:55 +08:00
parent 725028cb2d
commit 40c891f1b7
19 changed files with 698 additions and 16 deletions
+12 -1
View File
@@ -42,6 +42,9 @@ const accessVerifySql = read('database/migrations/2026061810_m03d_scene_wifi_acc
const pricingUpSql = read('database/migrations/2026061811_m04a_pricing_reservations.up.sql');
const pricingDownSql = read('database/migrations/2026061811_m04a_pricing_reservations.down.sql');
const pricingVerifySql = read('database/migrations/2026061811_m04a_pricing_reservations.verify.sql');
const orderStateUpSql = read('database/migrations/2026062012_m04b_order_state_machine.up.sql');
const orderStateDownSql = read('database/migrations/2026062012_m04b_order_state_machine.down.sql');
const orderStateVerifySql = read('database/migrations/2026062012_m04b_order_state_machine.verify.sql');
const coreTables = [
'qipai_schema_migrations',
@@ -196,5 +199,13 @@ for (const table of [
assert.match(pricingUpSql, /full_day_price_cents/);
assert.match(pricingUpSql, /minimum_spend_cents/);
assert.match(pricingUpSql, /idx_qipai_reservation_overlap/);
assert.match(orderStateUpSql, /CREATE TABLE IF NOT EXISTS qipai_order_status_history/);
assert.match(orderStateDownSql, /DROP TABLE IF EXISTS qipai_order_status_history/);
assert.match(orderStateVerifySql, /'qipai_order_status_history'/);
assert.match(orderStateUpSql, /status_version INT UNSIGNED/);
assert.match(orderStateUpSql, /UNIQUE KEY uq_qipai_order_history_trace/);
assert.match(orderStateUpSql, /actor_type VARCHAR/);
assert.match(orderStateUpSql, /source VARCHAR/);
assert.match(orderStateUpSql, /trace_id VARCHAR/);
console.log('PASS: M01-B through M04-A migration contracts are present.');
console.log('PASS: M01-B through M04-B migration contracts are present.');