This commit is contained in:
2026-03-02 10:44:30 +01:00
parent e293205e66
commit 634be9b01d
52 changed files with 3033 additions and 3 deletions
+12
View File
@@ -0,0 +1,12 @@
import _ from "lodash";
import { DefaultFields } from "../types";
export default function ({ dbSchema }) {
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;
}