Member Junction
    Preparing search index...

    Live-database capabilities the baker needs, injected by the caller (MJCLI wires these to @memberjunction/codegen-lib + a pg pool). The working DB must be seeded to the state just BEFORE the migration being baked, and is left CURRENT after each bakeMigration.

    interface BakerWorkingDB {
        apply(sql: string): Promise<void>;
        captureEntity(entityDisplayName: string): Promise<CapturedEntitySQL>;
        listBakeableEntities(): Promise<string[]>;
        refreshMetadata(): Promise<void>;
    }
    Index

    Methods

    • Execute a transpiled hand-DDL + metadata-DML script against the working DB.

      Parameters

      • sql: string

      Returns Promise<void>

    • Every entity CodeGen generates objects for, in generation order — the full set mj codegen would process (IncludeInAPI, minus excluded schemas). A baseline has NO CodeGen banners, so MigrationSplitter.extractAffectedEntities yields []; baking a baseline instead captures native CodeGen for THIS full set (see bakeMigration).

      Returns Promise<string[]>