This commit is contained in:
Benjamin Toby
2025-07-28 07:23:45 +01:00
parent a429436939
commit 8ac8b8eb51
49 changed files with 475 additions and 177 deletions
@@ -11,6 +11,7 @@ export default function grabTextFieldType(
if (field.css) return "css";
if (field.javascript) return "javascript";
if (field.shell) return "shell";
if (field.markdown) return "markdown";
if (nullReturn) return undefined;
return "plain";
}
@@ -122,15 +122,16 @@ export default function ({
/**
* Handle scenario where this table is a child of another
*/
if (
currentTableSchema.childTable &&
currentTableSchema.childTableDbId &&
currentTableSchema.childTableDbId
) {
const targetParentDatabase = grabPrimaryRequiredDbSchema({
dbId: currentTableSchema.childTableDbId,
userId,
});
if (currentTableSchema.childTable && currentTableSchema.childTableDbId) {
const isParentDbCurrentDb =
currentTableSchema.childTableDbId == newCurrentDbSchema.id;
const targetParentDatabase = isParentDbCurrentDb
? newCurrentDbSchema
: grabPrimaryRequiredDbSchema({
dbId: currentTableSchema.childTableDbId,
userId,
});
const targetParentDatabaseTableIndex =
targetParentDatabase?.tables.findIndex(
@@ -26,6 +26,7 @@ export default function setTextFieldType(
if (type == "yaml") return { ...newField, yaml: true };
if (type == "javascript") return { ...newField, javascript: true };
if (type == "code") return { ...newField, code: true };
if (type == "markdown") return { ...newField, markdown: true };
return { ...newField };
}