An extension to allow you to separate data migrations from structure migrations
This extension allows you to separate data migrations from structure migrations., (*1)
The preferred way to install this extension is through composer., (*2)
With Composer installed, you can then install the extension using the following commands:, (*3)
NOTE: Until laravel 7.x use version 1.x. From laravel 8.0 and later use 2.x, (*4)
$ php composer.phar require jlorente/laravel-data-migrations
or add, (*5)
... "require": { "jlorente/laravel-data-migrations": "*" }
to the require
section of your composer.json
file., (*6)
config/app.php, (*7)
return [ //other stuff 'providers' => [ //other stuff \Jlorente\DataMigrations\DataMigrationsServiceProvider::class, ]; ];
php artisan vendor:publish --tag=data-migrations
This will create the default migrations directory and the config/data-migrations.php file., (*8)
By default, the table used to store the data migrations is "migrations_data" table. You can change the table on the config/data-migrations.php file., (*9)
The data migrations will be stored in the migrations_data folder of the database path if no path is specified in the command execution., (*10)
The available commands of the package are:, (*11)
Create migration command, (*12)
php artisan make:data-migration [name] [--path=]
The firts time you use it the data migrations table will be created., (*13)
Run migration command, (*14)
php artisan migrate-data [--path=]
Rollback migration command, (*15)
php artisan migrate-data:rollback [--path=]
The behavior of the migrations is the same as the regular migrations., (*16)
Copyright © 2018 JosĂ© Lorente MartĂn jose.lorente.martin@gmail.com., (*17)
Licensed under the MIT license. See LICENSE.txt for details., (*18)