ottowayne / sqlite-migration-fix
Laravel package to fix SQLite migrations by making all columns nullable in testing environments
Installs: 2 853
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.4.0
- doctrine/dbal: ~2.4
- illuminate/console: >=5.0 <5.2
- illuminate/filesystem: >=5.0 <5.2
- illuminate/support: >=5.0 <5.2
This package is not auto-updated.
Last update: 2024-11-13 07:30:54 UTC
README
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.