Revert "make non-fillable fields visible but disabled in UI"

This reverts commit f2aad9caac.
This commit is contained in:
dswbx
2025-10-24 14:08:32 +02:00
parent f2aad9caac
commit 166409fdf4
11 changed files with 37 additions and 353 deletions

View File

@@ -1,7 +1,6 @@
import { transformObject } from "bknd/utils";
import type { Kysely } from "kysely";
import { set } from "lodash-es";
import type { InitialModuleConfigs } from "modules/ModuleManager";
export type MigrationContext = {
db: Kysely<any>;
@@ -108,29 +107,6 @@ export const migrations: Migration[] = [
return config;
},
},
{
// change field.config.fillable to only "create" and "update"
version: 11,
up: async (config: InitialModuleConfigs) => {
const { data, ...rest } = config;
return {
...rest,
data: {
...data,
entities: transformObject(data?.entities ?? {}, (entity) => {
return {
...entity,
fields: transformObject(entity?.fields ?? {}, (field) => {
const fillable = field!.config?.fillable;
if (!fillable || typeof fillable === "boolean") return field;
return { ...field, config: { ...field!.config, fillable: true } };
}),
};
}),
},
};
},
},
];
export const CURRENT_VERSION = migrations[migrations.length - 1]?.version ?? 0;