JayBizzle / Laravel-Migrations-Organiser by JayBizzle

A Laravel package to help organise migration files.
305,709
108
6
Package Data
Maintainer Username: JayBizzle
Maintainer Contact: mbeech@mark-beech.co.uk (Mark Beech)
Package Create Date: 2015-03-24
Package Last Update: 2024-02-27
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-03-23 03:09:13
Package Statistics
Total Downloads: 305,709
Monthly Downloads: 4,641
Daily Downloads: 147
Total Stars: 108
Total Watchers: 6
Total Forks: 15
Total Open Issues: 3

Laravel 4 and 5 Migrations Organiser

Build Status Total Downloads Scrutinizer Code Quality

The number of migrations in any sized project can quickly become huge, and although they are ordered, having one big list can sometimes be inconvenient and slow to navigate.

This package will put your migrations in yyyy/mm folders e.g.

./database/migrations/2015/03/2015_03_25_210946_create_users_table.php

Versions

Installation

Run composer require jaybizzle/laravel-migrations-organiser 4.* or add "jaybizzle/laravel-migrations-organiser": "4.*" to your composer.json file.

Add the following to the providers array in your config/app.php file..

    Jaybizzle\MigrationsOrganiser\MigrationsOrganiserServiceProvider::class,

Laravel ^5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider

Usage

This package hooks into the default artisan make:migration command. Just use that as you normally would and the package takes care of the rest.

What if I have already created migrations

No problem, just run artisan migrate:organise and your migrations will be moved into the relevant yyyy/mm folders.

I want my migrations back to how they were

Again, no problem. Running artisan migrate:disorganise will move all migrations from the yyyy/mm folder structure into the base migrations folder. Add the --force option to delete left over folders without confirmation.

Analytics