Skip to content

Laravel package to fix SQLite migrations by making all columns nullable in testing environments

Notifications You must be signed in to change notification settings

ottowayne/sqlite-migration-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Laravel SQLite Migration Fix

This will fix the SQLite error Cannot add a NOT NULL column with default value NULL by making all columns nullable in testing environments.

Please note that this changes the behaviour of your app and thus may alter your test results.

Compatibility

  • Laravel 5.0

Installation

To install via composer add the following line to your composer.json:

"ottowayne/sqlite-migration-fix": "dev-master"

I recommend using this package in local environments (require-dev) only.

Finally add the service provider to your app.php:

'Ottowayne\SQLiteMigrationFix\DatabaseServiceProvider',

Usage

After adding the service provider you are done. The changes will only apply to the testing-environment.

About

Laravel package to fix SQLite migrations by making all columns nullable in testing environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages