feat(M02-B): 实现微信登录与可撤销会话
This commit is contained in:
@@ -18,6 +18,9 @@ const asyncVerifySql = read('database/migrations/2026061802_m01c_async_tasks.ver
|
||||
const tenantAppsUpSql = read('database/migrations/2026061803_m02a_tenant_apps.up.sql');
|
||||
const tenantAppsDownSql = read('database/migrations/2026061803_m02a_tenant_apps.down.sql');
|
||||
const tenantAppsVerifySql = read('database/migrations/2026061803_m02a_tenant_apps.verify.sql');
|
||||
const authUpSql = read('database/migrations/2026061804_m02b_wechat_auth.up.sql');
|
||||
const authDownSql = read('database/migrations/2026061804_m02b_wechat_auth.down.sql');
|
||||
const authVerifySql = read('database/migrations/2026061804_m02b_wechat_auth.verify.sql');
|
||||
|
||||
const coreTables = [
|
||||
'qipai_schema_migrations',
|
||||
@@ -99,4 +102,14 @@ assert.match(tenantAppsUpSql, /UNIQUE KEY uq_qipai_tenant_configs_tenant_app \(t
|
||||
assert.match(tenantAppsUpSql, /brand_name VARCHAR/);
|
||||
assert.match(tenantAppsUpSql, /theme_color VARCHAR/);
|
||||
|
||||
console.log('PASS: M01-B through M02-A migration contracts are present.');
|
||||
for (const table of ['qipai_users', 'qipai_user_identities', 'qipai_auth_sessions']) {
|
||||
assert.match(authUpSql, new RegExp(`CREATE TABLE IF NOT EXISTS ${table}\\b`));
|
||||
assert.match(authDownSql, new RegExp(`DROP TABLE IF EXISTS ${table}\\b`));
|
||||
assert.match(authVerifySql, new RegExp(`'${table}'`));
|
||||
}
|
||||
assert.match(authUpSql, /role_version INT UNSIGNED/);
|
||||
assert.match(authUpSql, /UNIQUE KEY uq_qipai_user_identities_tenant_app_openid/);
|
||||
assert.match(authUpSql, /revoked_at DATETIME\(3\)/);
|
||||
assert.match(authUpSql, /expires_at DATETIME\(3\)/);
|
||||
|
||||
console.log('PASS: M01-B through M02-B migration contracts are present.');
|
||||
|
||||
Reference in New Issue
Block a user