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:
parent
124ce342d8
commit
429a49b07e
@ -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)}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user