import { TABLES } from "../protocol/index.mjs"; export const CLOUD_CORE_MIGRATION_ID = "0001_cloud_core_skeleton"; export const FROZEN_CLOUD_CORE_TABLES = Object.freeze([...TABLES]); export const CLOUD_CORE_MIGRATIONS = Object.freeze([ { id: CLOUD_CORE_MIGRATION_ID, path: "internal/db/migrations/0001_cloud_core_skeleton.sql", tables: FROZEN_CLOUD_CORE_TABLES, connectsToDatabase: false } ]); export function assertFrozenCloudCoreTables(tables = FROZEN_CLOUD_CORE_TABLES) { const missing = TABLES.filter((table) => !tables.includes(table)); if (missing.length > 0) { throw new Error(`cloud core schema is missing frozen tables: ${missing.join(", ")}`); } }