fix(news): align news002 defaults with tests for portal release

Update template version exports and draft worker tests so fast release
guards pass with the news-engine integration branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-22 15:34:15 +08:00
parent 4a26db5e84
commit bbee02b565
4 changed files with 17 additions and 8 deletions
+7
View File
@@ -1247,6 +1247,13 @@ export async function migrateSchema(pool) {
export async function initSchema(pool) {
const schemaPath = path.join(__dirname, 'schema.sql');
if (!fs.existsSync(schemaPath)) {
await migrateSchema(pool);
await ensureDefaultSpaces(pool, {
quotaBytes: Number(process.env.MINDSPACE_FREE_QUOTA_BYTES ?? 5 * 1024 * 1024),
});
return;
}
const sql = fs
.readFileSync(schemaPath, 'utf8')
.split('\n')