This commit is contained in:
Benjamin Toby
2025-06-04 08:46:39 +01:00
parent 881128fcea
commit 6e334c2525
8 changed files with 21 additions and 21 deletions
@@ -3,12 +3,13 @@ import { default as grabUserSchemaData } from "../../functions/backend/grabUserS
import { default as setUserSchemaData } from "../../functions/backend/setUserSchemaData";
import addDbEntry from "../../functions/backend/db/addDbEntry";
import slugToCamelTitle from "../../shell/utils/slugToCamelTitle";
import { DSQL_DATASQUIREL_USER_DATABASES } from "@/package-shared/types/dsql";
import { DSQL_DATASQUIREL_USER_DATABASES } from "../../types/dsql";
import {
DSQL_FieldSchemaType,
DSQL_IndexSchemaType,
DSQL_MYSQL_SHOW_COLUMNS_Type,
DSQL_TableSchemaType,
} from "@/package-shared/types";
} from "../../types";
type Params = {
userId: number | string;
@@ -113,14 +114,13 @@ export default async function createDbSchemaFromDb({
if (!Index_comment?.match(/^schema_index$/)) continue;
const indexNewObject: import("@/package-shared/types").DSQL_IndexSchemaType =
{
indexType: Index_type?.match(/fulltext/i)
? "fullText"
: "regular",
indexName: Key_name,
indexTableFields: [],
};
const indexNewObject: DSQL_IndexSchemaType = {
indexType: Index_type?.match(/fulltext/i)
? "fullText"
: "regular",
indexName: Key_name,
indexTableFields: [],
};
const targetTableFieldObject = tableColumns?.filter(
(col) => col.Field === Column_name
@@ -1,8 +1,8 @@
import { DSQL_DatabaseSchemaType, UserType } from "@/package-shared/types";
import { DSQL_DatabaseSchemaType, UserType } from "../../types";
import serverError from "./serverError";
import fs from "fs";
import grabDirNames from "@/package-shared/utils/backend/names/grab-dir-names";
import { EJSON } from "@/client-exports";
import grabDirNames from "../../utils/backend/names/grab-dir-names";
import EJSON from "../../utils/ejson";
type Params = {
userId?: string | number;
@@ -2,7 +2,7 @@ import serverError from "./serverError";
import fs from "fs";
import path from "path";
import { DSQL_DatabaseSchemaType } from "../../types";
import grabDirNames from "@/package-shared/utils/backend/names/grab-dir-names";
import grabDirNames from "../../utils/backend/names/grab-dir-names";
type Param = {
userId: string | number;