Schema
Updated
Schema sync brings the physical database in line with the metadata: it creates and alters tables and columns. You do not write migrations.
Note
There are no foreign keys in the database. Relationships are application logic.
DeleteAsyncis the guard — see Identity.
The EDT resolver maps a field's type to a column type: a Reference EDT becomes uniqueidentifier, an enum becomes an integer, a string takes its length.
The primary key of a business table is MetaId, not an integer Id — see Identity.
Integer in metadata is Integer, not Int. Import accepts Int silently. Schema sync then fails with "Base type 'Int' is not in the catalog": the object exists, the table does not.
Before every CREATE the synchronizer asks: does this table already exist? "Exists" means an identifier spelled exactly that way in the current schema. SQL Server and PostgreSQL disagree about case. The trap, the two dialect members, and what "Schema synchronized successfully" actually means are Schema sync: identifiers.
Business tables are quoted unqualified identifiers (FROM "DeliveryTerm"). Metadata tables are the Meta* catalog.