Skip to content

Design document

Michael Buchoff edited this page Sep 17, 2022 · 2 revisions

Here is a TypeScript object that the mermaid file will be parsed to. It will be used to generate the SQL.

interface Table {
    tableName: string;
    columns: Column[];
};

interface Column {
    columnName: string;
    type: string; // "varchar(40)"

    isPK: boolean;
    order: number; // first element of the above array is 0 here, etc
    columnOverride: string | null; // decorators ie "NULL", "CONSTRAINT ...", "ALIAS ..."
    FK: 
};
Clone this wiki locally