mirror of
https://github.com/strapi/strapi.git
synced 2025-11-09 14:51:29 +00:00
Merge pull request #14342 from strapi/fix/sqlite-pk-migration
Create id column as nullable to avoid conflict with default null values
This commit is contained in:
commit
786684f36c
@ -316,7 +316,7 @@ const createHelpers = (db) => {
|
|||||||
debug(`Creating column ${addedColumn.name}`);
|
debug(`Creating column ${addedColumn.name}`);
|
||||||
|
|
||||||
if (addedColumn.type === 'increments' && !db.dialect.canAddIncrements()) {
|
if (addedColumn.type === 'increments' && !db.dialect.canAddIncrements()) {
|
||||||
tableBuilder.integer(addedColumn.name).unsigned().notNullable();
|
tableBuilder.integer(addedColumn.name).unsigned();
|
||||||
tableBuilder.primary(addedColumn.name);
|
tableBuilder.primary(addedColumn.name);
|
||||||
} else {
|
} else {
|
||||||
createColumn(tableBuilder, addedColumn);
|
createColumn(tableBuilder, addedColumn);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user