Updates
This commit is contained in:
@@ -2,7 +2,7 @@ import varDatabaseDbHandler from "../utils/varDatabaseDbHandler";
|
||||
import { DSQL_DatabaseSchemaType, PostInsertReturn } from "../../types";
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "../../types/dsql";
|
||||
import numberfy from "../../utils/numberfy";
|
||||
import addDbEntry from "@/package-shared/functions/backend/db/addDbEntry";
|
||||
import addDbEntry from "../../functions/backend/db/addDbEntry";
|
||||
|
||||
type Param = {
|
||||
userId?: number | string | null;
|
||||
|
||||
@@ -11,8 +11,8 @@ import {
|
||||
DsqlTables,
|
||||
} from "../../types/dsql";
|
||||
import sqlGenerator from "../../functions/dsql/sql/sql-generator";
|
||||
import numberfy from "@/package-shared/utils/numberfy";
|
||||
import addDbEntry from "@/package-shared/functions/backend/db/addDbEntry";
|
||||
import numberfy from "../../utils/numberfy";
|
||||
import addDbEntry from "../../functions/backend/db/addDbEntry";
|
||||
|
||||
type Param = {
|
||||
userId?: number | string | null;
|
||||
|
||||
@@ -26,7 +26,7 @@ export default async function createDbFromSchema({
|
||||
userId,
|
||||
targetDatabase,
|
||||
dbSchemaData,
|
||||
}: Param) {
|
||||
}: Param): Promise<boolean> {
|
||||
const { userSchemaMainJSONFilePath, mainShemaJSONFilePath } = grabDirNames({
|
||||
userId,
|
||||
});
|
||||
@@ -41,7 +41,7 @@ export default async function createDbFromSchema({
|
||||
|
||||
if (!dbSchema) {
|
||||
console.log("Schema Not Found!");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < dbSchema.length; i++) {
|
||||
@@ -228,4 +228,6 @@ export default async function createDbFromSchema({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user