Updates
This commit is contained in:
+1
-1
@@ -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
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user