You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-03 23:50:33 +02:00
Chore: Fixed database type generation script
This commit is contained in:
@ -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)}`;
|
||||||
|
Reference in New Issue
Block a user