First Commit. Based off bun-sqlite

This commit is contained in:
2026-06-21 06:18:34 +01:00
commit 9c8f6e20aa
155 changed files with 11103 additions and 0 deletions
@@ -0,0 +1,20 @@
import _ from "lodash";
import { DefaultFields, type BUN_MARIADB_DatabaseSchemaType } from "../types";
type Params = {
dbSchema: BUN_MARIADB_DatabaseSchemaType;
};
export default function ({ dbSchema }: Params): BUN_MARIADB_DatabaseSchemaType {
const finaldbSchema = _.cloneDeep(dbSchema);
finaldbSchema.tables = finaldbSchema.tables.map((t) => {
const newTable = _.cloneDeep(t);
newTable.fields = newTable.fields.filter(
(f) => !f.fieldName?.match(/^(id|created_at|updated_at)$/),
);
newTable.fields.unshift(...DefaultFields);
return newTable;
});
return finaldbSchema;
}