feat(M05-A): 建立统一支付领域与幂等回调
This commit is contained in:
@@ -51,6 +51,9 @@ const adjustmentVerifySql = read('database/migrations/2026062013_m04c_order_adju
|
||||
const shareUpSql = read('database/migrations/2026062014_m04d_order_shares.up.sql');
|
||||
const shareDownSql = read('database/migrations/2026062014_m04d_order_shares.down.sql');
|
||||
const shareVerifySql = read('database/migrations/2026062014_m04d_order_shares.verify.sql');
|
||||
const paymentUpSql = read('database/migrations/2026062015_m05a_payment_domain.up.sql');
|
||||
const paymentDownSql = read('database/migrations/2026062015_m05a_payment_domain.down.sql');
|
||||
const paymentVerifySql = read('database/migrations/2026062015_m05a_payment_domain.verify.sql');
|
||||
|
||||
const coreTables = [
|
||||
'qipai_schema_migrations',
|
||||
@@ -226,5 +229,18 @@ assert.match(shareUpSql, /token_hash CHAR\(64\)/);
|
||||
assert.match(shareUpSql, /allow_open_door TINYINT/);
|
||||
assert.match(shareUpSql, /allow_renew TINYINT/);
|
||||
assert.match(shareUpSql, /UNIQUE KEY uq_qipai_order_share_token_hash/);
|
||||
for (const table of [
|
||||
'qipai_payment_attempts', 'qipai_payment_callbacks', 'qipai_refunds',
|
||||
'qipai_profit_shares', 'qipai_payment_configs'
|
||||
]) {
|
||||
assert.match(paymentUpSql, new RegExp(`CREATE TABLE IF NOT EXISTS ${table}`));
|
||||
assert.match(paymentDownSql, new RegExp(`DROP TABLE IF EXISTS ${table}`));
|
||||
assert.match(paymentVerifySql, new RegExp(`'${table}'`));
|
||||
}
|
||||
assert.match(paymentUpSql, /client_request_id VARCHAR/);
|
||||
assert.match(paymentUpSql, /UNIQUE KEY uq_qipai_payment_callback_provider/);
|
||||
assert.match(paymentUpSql, /credential_ref VARCHAR/);
|
||||
assert.match(paymentUpSql, /scope_key VARCHAR/);
|
||||
assert.doesNotMatch(paymentUpSql, /credential_secret|private_key|api_secret/i);
|
||||
|
||||
console.log('PASS: M01-B through M04-D migration contracts are present.');
|
||||
console.log('PASS: M01-B through M05-A migration contracts are present.');
|
||||
|
||||
Reference in New Issue
Block a user