StaticCreateCreate or modify multiple entities in a single pipeline batch — one CodeGen run covers all tables, which is the primary performance benefit over calling CreateEntity/ModifyEntity individually.
Execution sequence:
Partial failure is supported: if 3 of 5 tables succeed and 2 fail, the successful tables are live in the DB, CodeGen runs on them, and the caller receives per-table Success flags to present to the user.
One entry per table. Tables are sorted internally by FK dependency before migration SQL is generated.
MJ context user forwarded to DB queries and provenance.
Optionaloptions: PipelineExecutionOptionsPipeline execution options applied to the whole batch.
StaticCreateCreate a new entity: generate migration SQL, execute the RSU pipeline, refresh metadata, and persist provenance settings.
Optionaloptions: PipelineExecutionOptionsStaticLoadLoad the physical column information for an existing table from MJ's Entity Fields metadata. Returns null if the table is not known to MJ.
Shared by both the Schema Builder agent (alter path) and the Modify Entity action so there is a single, correct implementation — including Precision and Scale which are required for SchemaEvolution to correctly diff numeric column changes.
StaticModifyModify an existing entity: diff desired vs existing schema, generate ALTER TABLE migration SQL, execute the RSU pipeline, and refresh metadata.
Optionaloptions: PipelineExecutionOptionsStaticsortSort table definitions so that tables referenced by FK from other tables in the batch appear BEFORE the tables that reference them.
Uses Kahn's topological sort algorithm — runs in O(V+E) time where V is the number of tables and E is the number of FK relationships within the batch. Tables with no intra-batch FK dependencies retain their original relative order (stable sort property of Kahn's algorithm with a queue).
If a circular FK dependency exists (which SchemaEngine would reject during DDL generation anyway), the cycle is detected and the remaining tables are appended in original order so the batch does not silently drop tables.
Table definitions to sort. Not mutated.
A new array with the same tables in dependency order.
Stateless service that coordinates SchemaEngine + RuntimeSchemaManager to create or modify database entities. Both the agent layer and the action layer delegate here.