feat(M06-B): 建立设备资产与拓扑管理
This commit is contained in:
@@ -63,6 +63,9 @@ const thirdPartyVerifySql = read('database/migrations/2026062217_m05c_third_part
|
||||
const profitSharingUpSql = read('database/migrations/2026062218_m05d_profit_sharing.up.sql');
|
||||
const profitSharingDownSql = read('database/migrations/2026062218_m05d_profit_sharing.down.sql');
|
||||
const profitSharingVerifySql = read('database/migrations/2026062218_m05d_profit_sharing.verify.sql');
|
||||
const deviceTopologyUpSql = read('database/migrations/2026062219_m06b_device_topology.up.sql');
|
||||
const deviceTopologyDownSql = read('database/migrations/2026062219_m06b_device_topology.down.sql');
|
||||
const deviceTopologyVerifySql = read('database/migrations/2026062219_m06b_device_topology.verify.sql');
|
||||
|
||||
const coreTables = [
|
||||
'qipai_schema_migrations',
|
||||
@@ -285,5 +288,18 @@ assert.doesNotMatch(
|
||||
profitSharingUpSql,
|
||||
/\bprivate_key\b|\bapi_v3_key\b|\breceiver_account\b/i
|
||||
);
|
||||
for (const table of [
|
||||
'qipai_device_alerts', 'qipai_device_channels', 'qipai_device_links',
|
||||
'qipai_device_status_snapshots', 'qipai_device_maintenance_records'
|
||||
]) {
|
||||
assert.match(deviceTopologyUpSql, new RegExp(`CREATE TABLE IF NOT EXISTS ${table}`));
|
||||
assert.match(deviceTopologyDownSql, new RegExp(`DROP TABLE IF EXISTS ${table}`));
|
||||
assert.match(deviceTopologyVerifySql, new RegExp(`'${table}'`));
|
||||
}
|
||||
assert.match(deviceTopologyUpSql, /uq_qipai_device_channel_target/);
|
||||
assert.match(deviceTopologyUpSql, /uq_qipai_device_link_child/);
|
||||
assert.match(deviceTopologyUpSql, /uq_qipai_device_link_room_type/);
|
||||
assert.match(deviceTopologyUpSql, /device\.read/);
|
||||
assert.match(deviceTopologyUpSql, /device\.write/);
|
||||
|
||||
console.log('PASS: M01-B through M05-D migration contracts are present.');
|
||||
console.log('PASS: M01-B through M06-B migration contracts are present.');
|
||||
|
||||
Reference in New Issue
Block a user