2017 © Pedro PelĂĄez
 

library laravel-data-migrations

An extension to allow you to separate data migrations from structure migrations

image

jlorente/laravel-data-migrations

An extension to allow you to separate data migrations from structure migrations

  • Thursday, February 15, 2018
  • by jlorente
  • Repository
  • 1 Watchers
  • 3 Stars
  • 117 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 83 % Grown

The README.md

Data Migrations for Laravel

This extension allows you to separate data migrations from structure migrations., (*1)

Installation

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)

Configuration

  1. Register the ServiceProvider in your config/app.php service provider list. This step can be skipped in Laravel 5.5+

config/app.php, (*7)

return [
    //other stuff
    'providers' => [
        //other stuff
        \Jlorente\DataMigrations\DataMigrationsServiceProvider::class,
    ];
];
  1. Publish the new assets.
php artisan vendor:publish --tag=data-migrations

This will create the default migrations directory and the config/data-migrations.php file., (*8)

Usage

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)

License

Copyright © 2018 José Lorente Martín jose.lorente.martin@gmail.com., (*17)

Licensed under the MIT license. See LICENSE.txt for details., (*18)

The Versions

15/02 2018

dev-master

9999999-dev

An extension to allow you to separate data migrations from structure migrations

  Sources   Download

MIT

by Jose Lorente

15/02 2018

1.0.3

1.0.3.0

An extension to allow you to separate data migrations from structure migrations

  Sources   Download

MIT

by Jose Lorente

15/02 2018

1.0.2

1.0.2.0

An extension to allow you to separate data migrations from structure migrations

  Sources   Download

MIT

by Jose Lorente

14/02 2018

1.0.1

1.0.1.0

An extension to allow you to separate data migrations from structure migrations

  Sources   Download

MIT

by Jose Lorente

13/02 2018

1.0.0

1.0.0.0

An extension to allow you to separate data migrations from structure migrations

  Sources   Download

MIT

by Jose Lorente