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:
Oreille
2021-10-29 18:24:21 +02:00
committed by GitHub
parent bb9b8f5d36
commit 8df071a3a2
11 changed files with 35 additions and 15 deletions

View File

@@ -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);
}
}