GithubHelp home page GithubHelp logo

modernben / laravel-data-migrations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coderan-io/laravel-data-migrations

0.0 0.0 0.0 39 KB

Data migration system for Laravel

License: MIT License

PHP 100.00%

laravel-data-migrations's Introduction

Data Migrations for Laravel

This extension allows you to separate data migrations from structure migrations.

Installation

The preferred way to install this extension is through composer.

With Composer installed, you can then install the extension using the following commands:

composer require coderan/laravel-data-migrations

or add

...
    "require": {
        "coderan/laravel-data-migrations": "^1.0"
    }

to the require section of your composer.json file.

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

return [
    //other stuff
    'providers' => [
        \Coderan\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.

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.

The data migrations will be stored in the migrations_data folder of the database path if no path is specified in the command execution.

The available commands of the package are:

Create migration command

php artisan make:data-migration [name] [--path=]

The first time you use it the data migrations table will be created.

Run migration command

php artisan migrate-data [--path=]

Rollback migration command

php artisan migrate-data:rollback [--path=]

The behavior of the migrations is the same as the regular migrations.

License

Copyright © 2021 José Lorente Martín [email protected], Eran Machiels [email protected].

Licensed under the MIT license. See LICENSE.txt for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.