diff --git a/app/src/modules/settings/routes/data-model/collections/components/new-collection/new-collection.vue b/app/src/modules/settings/routes/data-model/collections/components/new-collection/new-collection.vue index 8104a60a54..eb59bf0748 100644 --- a/app/src/modules/settings/routes/data-model/collections/components/new-collection/new-collection.vue +++ b/app/src/modules/settings/routes/data-model/collections/components/new-collection/new-collection.vue @@ -219,6 +219,7 @@ export default defineComponent({ function getPrimaryKeyField() { const field: DeepPartial = { field: primaryKeyFieldName.value, + type: 'integer', system: { hidden: false, interface: 'numeric', @@ -227,28 +228,38 @@ export default defineComponent({ database: { has_auto_increment: true, is_primary_key: true, - type: 'INT', }, }; if (primaryKeyFieldType.value === 'uuid') { return { ...field, - interface: 'text-input', type: 'uuid', - datatype: 'VARCHAR', - length: 36, - auto_increment: false, + system: { + ...field.system, + interface: 'text-input', + special: 'uuid', + }, + database: { + ...field.database, + length: 36, + has_auto_increment: false, + } }; } else if (primaryKeyFieldType.value === 'manual') { return { ...field, - interface: 'text-input', type: 'string', - datatype: 'VARCHAR', - length: 255, - auto_increment: false, - readonly: false, + system: { + ...field.system, + interface: 'text-input', + readonly: false, + }, + database: { + ...field.database, + length: 255, + auto_increment: false, + } }; } else { // auto_int @@ -266,7 +277,7 @@ export default defineComponent({ width: 'full', required: true, options: { - status_mapping: { + statuses: { published: { name: 'Published', value: 'published',