mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +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}`);
 | 
			
		||||
 | 
			
		||||
        if (addedColumn.type === 'increments' && !db.dialect.canAddIncrements()) {
 | 
			
		||||
          tableBuilder.integer(addedColumn.name).unsigned().notNullable();
 | 
			
		||||
          tableBuilder.integer(addedColumn.name).unsigned();
 | 
			
		||||
          tableBuilder.primary(addedColumn.name);
 | 
			
		||||
        } else {
 | 
			
		||||
          createColumn(tableBuilder, addedColumn);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user