mirror of
https://github.com/directus/directus.git
synced 2026-01-31 06:48:07 -05:00
Merge pull request #3524 from nickrum/field-schema-improvements
Field schema improvements
This commit is contained in:
@@ -873,6 +873,8 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
|
||||
state.fieldData.meta.display_options = null;
|
||||
state.fieldData.meta.special = null;
|
||||
state.fieldData.schema.default_value = undefined;
|
||||
state.fieldData.schema.max_length = undefined;
|
||||
state.fieldData.schema.is_nullable = true;
|
||||
|
||||
switch (state.fieldData.type) {
|
||||
case 'uuid':
|
||||
@@ -886,11 +888,9 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
|
||||
break;
|
||||
case 'boolean':
|
||||
state.fieldData.meta.special = ['boolean'];
|
||||
state.fieldData.schema.is_nullable = false;
|
||||
state.fieldData.schema.default_value = false;
|
||||
state.fieldData.schema.is_nullable = false;
|
||||
break;
|
||||
default:
|
||||
state.fieldData.schema.default_value = undefined;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user