ottowayne/sqlite-migration-fix

Laravel package to fix SQLite migrations by making all columns nullable in testing environments
2,853 3
Install
composer require ottowayne/sqlite-migration-fix
PHP:>=5.4.0
License:MIT
Last Updated:Feb 3, 2016
Links: GitHub  ·  Packagist
Maintainer: ottowayne

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.

Related Packages

orottier/laravel-migration-squasher

Aggregate your incremental Laravel migration files into single migration for eac...

95 7
cytracom/squasher

Aggregate your incremental Laravel migration files into single migration for eac...

307 26
orchestra/tenanti

Tenant based Database Schema Manager for Laravel

125,122 588
thedevsaddam/laravel-schema

Display the connected database information in console.

28,543 111
shiftonelabs/laravel-nomad

Add extra functionality to Laravel migrations.

114,678 20