2017 © Pedro Peláez
 

library laravel-migration

A migration service based on Laravel Database package.

image

tomzx/laravel-migration

A migration service based on Laravel Database package.

  • Saturday, November 21, 2015
  • by tomzx
  • Repository
  • 1 Watchers
  • 5 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laravel Migration

License Latest Stable Version Latest Unstable Version Build Status Code Quality Code Coverage Total Downloads, (*1)

This is a small package that builds on Laravel's wonderful database package. It extracts the database migration feature in order to use it in any project that may not be built on Laravel., (*2)

Note

This is currently a proof of concept. There are rough edges (such as the configuration file and migrations folder location). Those should be fixed given enough time and feedback. Feel free to submit a PR if you have a suggestion on how to deal with those!, (*3)

This project currently uses some from of "hack" by creating some files in the Illuminate/Foundation namespace. It is expected you will not use this project within the context of a Laravel application, otherwise conflicts will occur., (*4)

Getting Started

Laravel 4

Due to technical constraints, the folder structure in Laravel 4 has to be a certain way (specifically, we need a database/migrations path). You can follow Laravel 5 instructions on how to get started, simply make sure that you create the database/migrations path (instead of simply migrations)., (*5)

your-project
- database
-- database.php
-- database
--- migrations
---- 2015_11_17_215411_some_migration.php
- vendor
-- tomzx
--- LaravelMigration

Laravel 5

The current implementation looks in the current working directory for a configuration file database.php and migration files in the migrations directory., (*6)

your-project
- database
-- database.php
-- migrations
--- 2015_11_17_215411_some_migration.php
- vendor
-- tomzx
--- LaravelMigration

To use the tool, you would call laravel-migration within the database directory in the following way:, (*7)

php ../vendor/bin/laravel-migration, (*8)

Thus, the current setup steps are:, (*9)

  1. Create a database directory where you will store your database.php and migrations files
  2. Copy database.php to your newly created directory and configure it to your needs
  3. Create a migrations directory in the newly created directory
  4. You may now enjoy laravel-migration!

License

The code is licensed under the MIT license. See LICENSE., (*10)

The Versions