feat(M04-A): 完成定价快照与并发时段预占
This commit is contained in:
@@ -39,6 +39,9 @@ const discoveryVerifySql = read('database/migrations/2026061809_m03c_store_disco
|
||||
const accessUpSql = read('database/migrations/2026061810_m03d_scene_wifi_access.up.sql');
|
||||
const accessDownSql = read('database/migrations/2026061810_m03d_scene_wifi_access.down.sql');
|
||||
const accessVerifySql = read('database/migrations/2026061810_m03d_scene_wifi_access.verify.sql');
|
||||
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 coreTables = [
|
||||
'qipai_schema_migrations',
|
||||
@@ -183,5 +186,15 @@ for (const table of [
|
||||
assert.match(accessUpSql, /scan_count BIGINT UNSIGNED/);
|
||||
assert.match(accessUpSql, /target_type = 'STORE'/);
|
||||
assert.match(accessUpSql, /PRIMARY KEY \(tenant_id, order_id, user_id\)/);
|
||||
for (const table of [
|
||||
'qipai_holiday_calendar', 'qipai_order_price_snapshots', 'qipai_room_reservations'
|
||||
]) {
|
||||
assert.match(pricingUpSql, new RegExp(`CREATE TABLE IF NOT EXISTS ${table}`));
|
||||
assert.match(pricingDownSql, new RegExp(`DROP TABLE IF EXISTS ${table}`));
|
||||
assert.match(pricingVerifySql, new RegExp(`'${table}'`));
|
||||
}
|
||||
assert.match(pricingUpSql, /full_day_price_cents/);
|
||||
assert.match(pricingUpSql, /minimum_spend_cents/);
|
||||
assert.match(pricingUpSql, /idx_qipai_reservation_overlap/);
|
||||
|
||||
console.log('PASS: M01-B through M03-D migration contracts are present.');
|
||||
console.log('PASS: M01-B through M04-A migration contracts are present.');
|
||||
|
||||
Reference in New Issue
Block a user