Chore: Fixed database type generation script

pull/6600/head
Laurent Cozic 2022-06-15 12:54:00 +01:00
parent 907721f3f8
commit 9047605637
1 changed files with 11 additions and 0 deletions

View File

@ -42,6 +42,17 @@ async function main() {
return t;
});
definitions.tables = definitions.tables.map((table: any) => {
table.columns = table.columns.map((column: any) => {
return {
...column,
optional: true,
};
});
return table;
});
const tsString = sqlts.fromObject(definitions, sqlTsConfig)
.replace(/": /g, '"?: ');
const header = `// AUTO-GENERATED BY ${__filename.substr(rootDir.length + 1)}`;