Remove not null on sqlite alter as the table is recreated afterwards

This commit is contained in:
Alexandre Bodin 2019-05-20 18:09:57 +02:00
parent ae4728be8c
commit ea5cdc78d8

View File

@ -163,7 +163,7 @@ module.exports = async ({ ORM, loadedModel, definition, connection, model }) =>
if (type) {
const col = tbl.specificType(key, type);
if (attribute.required) {
if (attribute.required && definition.client !== 'sqlite3') {
col.notNullable();
}
}