mirror of
https://github.com/directus/directus.git
synced 2026-02-19 10:14:33 -05:00
Default to nullable on field create
This commit is contained in:
@@ -185,10 +185,13 @@ export default class FieldsService {
|
||||
column.defaultTo(field.database.default_value);
|
||||
}
|
||||
|
||||
if (field.database.is_nullable && field.database.is_nullable === true) {
|
||||
column.nullable();
|
||||
} else {
|
||||
if (
|
||||
field.database.is_nullable !== undefined &&
|
||||
field.database.is_nullable === false
|
||||
) {
|
||||
column.notNullable();
|
||||
} else {
|
||||
column.nullable();
|
||||
}
|
||||
|
||||
column.alter();
|
||||
|
||||
Reference in New Issue
Block a user