Laravel package to fix SQLite migrations by making all columns nullable in testing environments
ottowayne/sqlite-migration-fix is a Laravel package for laravel package to fix sqlite migrations by making all columns nullable in testing environments.
It currently has 3 GitHub stars and 2.853 downloads on Packagist.
Install it with composer require ottowayne/sqlite-migration-fix.
Discover more Laravel packages by ottowayne
or browse all Laravel packages to compare alternatives.
Last updated
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.
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',
After adding the service provider you are done. The changes will only apply to the testing-environment.