2017 © Pedro Peláez
 

library db2migrations

Artisan command to convert your current SQL database schema into Laravel 5.4.* Migration files (one for each table).

image

d3vr/db2migrations

Artisan command to convert your current SQL database schema into Laravel 5.4.* Migration files (one for each table).

  • Wednesday, March 15, 2017
  • by d3vr
  • Repository
  • 1 Watchers
  • 2 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 38 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

DB2Migrations

This is a fork of adamkearsley/laravel-convert-migrations: * It adds support for **Laravel 5.4.***. * Fixes some bugs (e.g: timestamp default values not working). * Each table now has it's own migration file, instead of one file containing all the migrations., (*1)


This is an artisan command to convert your current SQL database schema into Laravel 5.4.* Migration files (one for each table). It'll come really handy when you have started a Laravel project without using migrations, if you're migrating an old app to Laravel, or maybe you used a database designer to generate SQL., (*2)

Installation

  1. Add the package to your composer.json file and run composer update:
"require": {
    "d3vr/db2migrations": "dev-master"
}
  1. Add d3vr\DB2Migrations\DB2MigrationsServiceProvider::class to your config/app.php file, inside the providers array.

Usage

Now it's as easy as running php artisan convert:migrations myDatabaseName. Wait a few seconds and, automagically, you'll have the new migration files in app/database/migrations., (*3)

Ignoring Tables, (*4)

You can even ignore tables from the migration if you need to. Just use the ignore option and separate table names with a comma: php artisan convert:migrations --ignore="table1, table2"., (*5)

Credits

Credits go to "bruceoutdoors" original class., (*6)

The Versions

15/03 2017

dev-master

9999999-dev

Artisan command to convert your current SQL database schema into Laravel 5.4.* Migration files (one for each table).

  Sources   Download

The Requires

 

by Fayçal Mitidji