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:
parent
6762a74e85
commit
6556a41a5a
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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],
|
||||
]
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue