1
0
Fork 0
mirror of synced 2024-07-07 07:15:43 +12:00

Fix for #5219 - default all string types to basic text format, allow user to switch string types to longform if they desire.

This commit is contained in:
mike12345567 2022-04-27 16:29:03 +01:00
parent 6762a74e85
commit 6556a41a5a
3 changed files with 13 additions and 5 deletions

View file

@ -144,7 +144,11 @@ export const RelationshipTypes = {
MANY_TO_ONE: "many-to-one",
}
export const ALLOWABLE_STRING_OPTIONS = [FIELDS.STRING, FIELDS.OPTIONS]
export const ALLOWABLE_STRING_OPTIONS = [
FIELDS.STRING,
FIELDS.OPTIONS,
FIELDS.LONGFORM,
]
export const ALLOWABLE_STRING_TYPES = ALLOWABLE_STRING_OPTIONS.map(
opt => opt.type
)

View file

@ -47,7 +47,11 @@ exports.FieldTypes = {
exports.CanSwitchTypes = [
[exports.FieldTypes.JSON, exports.FieldTypes.ARRAY],
[exports.FieldTypes.STRING, exports.FieldTypes.OPTIONS],
[
exports.FieldTypes.STRING,
exports.FieldTypes.OPTIONS,
exports.FieldTypes.LONGFORM,
],
[exports.FieldTypes.BOOLEAN, exports.FieldTypes.NUMBER],
]

View file

@ -42,9 +42,9 @@ const SQL_STRING_TYPE_MAP = {
nvarchar: FieldTypes.STRING,
ntext: FieldTypes.STRING,
enum: FieldTypes.STRING,
blob: FieldTypes.LONGFORM,
long: FieldTypes.LONGFORM,
text: FieldTypes.LONGFORM,
blob: FieldTypes.STRING,
long: FieldTypes.STRING,
text: FieldTypes.STRING,
}
const SQL_BOOLEAN_TYPE_MAP = {