CREATE TABLE fields (
    id                       bigint NOT NULL,
    table_id                 bigint NOT NULL,
    name                     VARCHAR2(50) NOT NULL,
    typing_id                bigint NOT NULL,
    ordinal_position         INTEGER NOT NULL,
    "default"                VARCHAR2(100),
    is_nullable              boolean DEFAULT false NOT NULL,
    character_maximum_length INTEGER,
    numeric_precision        INTEGER,
    numeric_scale            INTEGER,
    enum_id                  bigint,
    slug                     VARCHAR2(50) NOT NULL
);

CREATE INDEX fields_table ON
    fields (
        table_id
    ASC );

CREATE INDEX fields_slug ON
    fields (
        slug
    ASC );