First working version.

This commit is contained in:
2026-06-24 17:00:14 +01:00
parent 44f6c18a84
commit b5e4724e03
9 changed files with 92 additions and 151 deletions
+1 -5
View File
@@ -7,8 +7,6 @@ import _ from "lodash";
import appendDefaultFieldsToDbSchema from "../utils/append-default-fields-to-db-schema";
import chalk from "chalk";
import { writeLiveSchema } from "../functions/live-schema";
import grabDBDir from "../utils/grab-db-dir";
import { cpSync } from "fs";
export default function () {
return new Command("schema")
@@ -24,10 +22,9 @@ export default function () {
const config = global.CONFIG;
const dbSchema = global.DB_SCHEMA;
const { ROOT_DIR, BUN_MARIADB_TEMP_DB_FILE_PATH } = grabDirNames();
const { ROOT_DIR } = grabDirNames();
try {
const isVector = Boolean(opts.vector || opts.v);
const isTypeDef = Boolean(opts.typedef || opts.t);
const finaldbSchema = appendDefaultFieldsToDbSchema({
@@ -36,7 +33,6 @@ export default function () {
const manager = new MariaDBSchemaManager({
schema: finaldbSchema,
recreate_vector_table: isVector,
});
await manager.syncSchema();