Member Junction
    Preparing search index...

    Platform-aware DDL orchestrator. Pure function: input → SQL + file metadata. Never touches the database — all execution is handled by the caller.

    Index

    Constructors

    Methods

    • Generate an ALTER TABLE migration for schema evolution. Diffs desired state vs existing state and produces incremental DDL.

      Parameters

      • input: SchemaEvolutionInput

        Desired table definition + current DB state.

      • platform: DatabasePlatform

        Target database platform.

      • mjVersion: string

        MJ version string.

      • migrationsDir: string = 'migrations/v5'

        Directory prefix for the migration file name.

      • consumer: string = 'Schema'

        Identifies the calling subsystem.

      Returns MigrationOutput

      Error if the table definition is invalid.

    • Generate a CREATE TABLE migration from a generic TableDefinition.

      Includes CREATE SCHEMA IF NOT EXISTS guard, followed by CREATE TABLE. Returns migration SQL + Flyway-compatible file name.

      Parameters

      • table: TableDefinition

        Platform-agnostic table definition.

      • platform: DatabasePlatform

        Target database platform.

      • mjVersion: string

        MJ version string (e.g. "5.10") embedded in file name.

      • migrationsDir: string = 'migrations/v5'

        Directory prefix for the migration file name.

      • consumer: string = 'Schema'

        Identifies the calling subsystem (e.g. "Integration", "Agent").

      Returns MigrationOutput

      Error if the table definition is invalid.