Rename ATTACHMENT to ATTACHMENTS
This commit is contained in:
parent
757284d6c0
commit
aabee4d90e
|
@ -394,7 +394,7 @@
|
||||||
FIELDS.BIGINT,
|
FIELDS.BIGINT,
|
||||||
FIELDS.BOOLEAN,
|
FIELDS.BOOLEAN,
|
||||||
FIELDS.DATETIME,
|
FIELDS.DATETIME,
|
||||||
FIELDS.ATTACHMENT,
|
FIELDS.ATTACHMENTS,
|
||||||
FIELDS.ATTACHMENT_SINGLE,
|
FIELDS.ATTACHMENT_SINGLE,
|
||||||
FIELDS.LINK,
|
FIELDS.LINK,
|
||||||
FIELDS.FORMULA,
|
FIELDS.FORMULA,
|
||||||
|
|
|
@ -107,7 +107,7 @@ export const FIELDS = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ATTACHMENT: {
|
ATTACHMENTS: {
|
||||||
name: "Attachment List",
|
name: "Attachment List",
|
||||||
type: FieldType.ATTACHMENTS,
|
type: FieldType.ATTACHMENTS,
|
||||||
icon: "Folder",
|
icon: "Folder",
|
||||||
|
|
|
@ -192,7 +192,7 @@ const parseType = (value, type) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse attachments, treating no elements as null
|
// Parse attachments, treating no elements as null
|
||||||
if (type === FieldTypes.ATTACHMENT) {
|
if (type === FieldTypes.ATTACHMENTS) {
|
||||||
if (!Array.isArray(value) || !value.length) {
|
if (!Array.isArray(value) || !value.length) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ export async function checkForColumnUpdates(
|
||||||
column.subtype !== oldTable?.schema[column.name]?.subtype
|
column.subtype !== oldTable?.schema[column.name]?.subtype
|
||||||
)
|
)
|
||||||
for (const attachmentColumn of changedAttachmentSubtypeColumns) {
|
for (const attachmentColumn of changedAttachmentSubtypeColumns) {
|
||||||
if (attachmentColumn.subtype === FieldTypeSubtypes.ATTACHMENT.SINGLE) {
|
if (attachmentColumn.subtype === FieldTypeSubtypes.ATTACHMENTS.SINGLE) {
|
||||||
attachmentColumn.constraints ??= { length: {} }
|
attachmentColumn.constraints ??= { length: {} }
|
||||||
attachmentColumn.constraints.length ??= {}
|
attachmentColumn.constraints.length ??= {}
|
||||||
attachmentColumn.constraints.length.maximum = 1
|
attachmentColumn.constraints.length.maximum = 1
|
||||||
|
|
|
@ -48,7 +48,7 @@ export const FieldTypeSubtypes = {
|
||||||
USER: FieldSubtype.USER as FieldSubtype.USER,
|
USER: FieldSubtype.USER as FieldSubtype.USER,
|
||||||
USERS: FieldSubtype.USERS as FieldSubtype.USERS,
|
USERS: FieldSubtype.USERS as FieldSubtype.USERS,
|
||||||
},
|
},
|
||||||
ATTACHMENT: {
|
ATTACHMENTS: {
|
||||||
SINGLE: FieldSubtype.SINGLE as FieldSubtype.SINGLE,
|
SINGLE: FieldSubtype.SINGLE as FieldSubtype.SINGLE,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue