Skip to content

Table - *.table

Declarative DDL for a single table. Synchronizer: TablesSynchronizer (components/data/data-structures). DDL is emitted through the data source's ISqlDialect so the same artefact runs on H2, PostgreSQL, MSSQL, MariaDB, MySQL, HANA, and Snowflake.

File format

json
{
    "name": "COUNTRY",
    "type": "TABLE",
    "columns": [
        { "name": "ID",   "type": "BIGINT",  "primaryKey": true, "identity": true, "nullable": false },
        { "name": "CODE", "type": "VARCHAR", "length": 3,        "nullable": false, "unique": true },
        { "name": "NAME", "type": "VARCHAR", "length": 200,      "nullable": false }
    ],
    "constraints": {
        "uniqueIndices": [
            { "name": "UX_COUNTRY_CODE", "columns": ["CODE"] }
        ]
    }
}

Column fields

FieldNotes
nameColumn name.
typeSQL type. Use a dialect-agnostic form: BIGINT, VARCHAR, DECIMAL, BOOLEAN, DATE, TIMESTAMP, BLOB, CLOB.
lengthFor VARCHAR / CHAR.
precision, scaleFor DECIMAL.
primaryKeyMarks the primary key column. Multiple primaryKey: true -> composite key.
identityDB-generated identity.
nullableDefaults to true.
defaultValueSQL default expression.
uniqueShorthand for a single-column unique constraint.

Reconciliation

CREATE -> CREATE TABLE. UPDATE -> incremental ALTER TABLE for additive changes; destructive changes log a warning and are skipped. DELETE -> DROP TABLE (cascade off by default).

Editor

The Database Schema modeler emits .table files. The raw JSON is editable in Monaco.

See also

Released under the EPL-2.0 License.