lbadger/illuminate-data-migrations

Data Migrations for Laravel
1,500 3
Install
composer require lbadger/illuminate-data-migrations
Latest Version:6.0
Last Updated:Dec 2, 2019
Links: GitHub  ·  Packagist
Maintainer: lbadger

illuminate-data-migrations

Creating data migrations for Laravel. This keeps data out of migrations and leaves it for schema changes only.

Install

composer require lbadger/illuminate-data-migrations

Data Migration Folder

Create a folder called "data_migrations" in the /database folder

Laravel

config/database.php

'data-migrations' => 'data_migrations',

config/app.php

Add these to the 'providers' array

\Lbadger\Database\Providers\ArtisanServiceProvider::class,
\Lbadger\Database\Providers\DataMigrationServiceProvider::class,

Lumen

bootstrap/app.php

$app['config']['database.data-migrations'] = 'data_migrations';
$app->register(\Lbadger\Database\Providers\ArtisanServiceProvider::class);
$app->register(\Lbadger\Database\Providers\DataMigrationServiceProvider::class);

Custom Stub

If you would like to use custom stubs, you need to put your stub in the database/stubs directory with the suffix of .stub
  • Note: You cannot have the same data migration class name as a normal migration

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

634,760,849 9,707
laravel/framework

The Laravel Framework.

584,532,650 34,931
laravel/tinker

Powerful REPL for the Laravel framework.

493,838,477 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

408,553,772 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

387,976,821 4,658