1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-20 20:55:18 +02:00

Chore: Fixed database type generation script

This commit is contained in:
Laurent Cozic 2022-06-15 12:54:00 +01:00
parent 124ce342d8
commit 429a49b07e

View File

@ -42,6 +42,17 @@ async function main() {
return t; 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) const tsString = sqlts.fromObject(definitions, sqlTsConfig)
.replace(/": /g, '"?: '); .replace(/": /g, '"?: ');
const header = `// AUTO-GENERATED BY ${__filename.substr(rootDir.length + 1)}`; const header = `// AUTO-GENERATED BY ${__filename.substr(rootDir.length + 1)}`;