This commit is contained in:
Benjamin Toby
2025-02-19 08:39:03 +01:00
parent 8b3553fcd5
commit 2e0b6d0a70
26 changed files with 387 additions and 14 deletions
+1 -1
View File
@@ -7,5 +7,5 @@ type Param = {
* # Create database from Schema Function
* @requires DSQL_DB_CONN - Gobal Variable for Datasquirel Database
*/
export default function createDbFromSchema({ userId, targetDatabase, dbSchemaData, }: Param): Promise<void>;
export default function createDbFromSchema({ userId, targetDatabase, dbSchemaData, }: Param): Promise<boolean>;
export {};
+2 -1
View File
@@ -39,7 +39,7 @@ function createDbFromSchema(_a) {
ejson_1.default.parse(fs_1.default.readFileSync(schemaPath, "utf8"));
if (!dbSchema) {
console.log("Schema Not Found!");
return;
return false;
}
for (let i = 0; i < dbSchema.length; i++) {
const database = dbSchema[i];
@@ -195,5 +195,6 @@ function createDbFromSchema(_a) {
}
}
}
return true;
});
}