Ariweb Suite 0.1.1 기반: 공통 라이브러리(db·http·세션·작업 엔진·할당/예약·알림·감사·보관소), 포털 뼈대, Webmaker/AriMail 도입 소스와 manifest
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
9ca4cee341
commit
c7aea8d419
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* portal/schema.mjs — 포털 DB 마이그레이션 모음.
|
||||
* lib 의 공통 표(sessions·jobs·quota·notifications·audit) 뒤에 각 영역의 model.mjs 가 내보내는 MIGRATIONS 를 영역 순서대로 잇는다.
|
||||
* 마이그레이션 id 는 `<영역>_NNNN` 으로 고유해야 한다.
|
||||
*/
|
||||
import * as session from '../lib/session.mjs';
|
||||
import * as jobs from '../lib/jobs.mjs';
|
||||
import * as quota from '../lib/quota.mjs';
|
||||
import * as notify from '../lib/notify.mjs';
|
||||
import * as audit from '../lib/audit.mjs';
|
||||
import { join, dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { AREAS } from './app.mjs';
|
||||
|
||||
const HERE = dirname(fileURLToPath(import.meta.url));
|
||||
export async function allMigrations() {
|
||||
const list = [...session.MIGRATIONS, ...jobs.MIGRATIONS, ...quota.MIGRATIONS, ...notify.MIGRATIONS, ...audit.MIGRATIONS];
|
||||
for (const a of AREAS) { const f = join(HERE, a, 'model.mjs'); if (!existsSync(f)) continue; const m = await import(f); if (Array.isArray(m.MIGRATIONS)) list.push(...m.MIGRATIONS); }
|
||||
return list;
|
||||
}
|
||||
Reference in New Issue
Block a user