mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix generated columns being required. (#9200)
* Fix generated columns being required. Also prevent schema changes on generated columns. * Fix type errors * Disable `unique` and `nullable` instead of not showing them. * Fix other type error * Nullable check small refactor * Fixed MSSQL query * Fixed oracle query
This commit is contained in:
@@ -247,9 +247,9 @@ export class AuthorizationService {
|
||||
specials.includes(name)
|
||||
);
|
||||
|
||||
const notNullable = field.nullable === false && hasGenerateSpecial === false;
|
||||
const nullable = field.nullable || hasGenerateSpecial || field.generated;
|
||||
|
||||
if (notNullable) {
|
||||
if (!nullable) {
|
||||
requiredColumns.push(field);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user