Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaybizzle/laravel-migrations-organiser
A Laravel package to help organise migrations
https://github.com/jaybizzle/laravel-migrations-organiser
laravel migrations organise-migrations organiser php
Last synced: 9 days ago
JSON representation
A Laravel package to help organise migrations
- Host: GitHub
- URL: https://github.com/jaybizzle/laravel-migrations-organiser
- Owner: JayBizzle
- License: mit
- Created: 2015-03-24T22:30:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T19:14:50.000Z (7 months ago)
- Last Synced: 2024-09-19T15:37:12.063Z (about 2 months ago)
- Topics: laravel, migrations, organise-migrations, organiser, php
- Language: PHP
- Homepage:
- Size: 108 KB
- Stars: 109
- Watchers: 6
- Forks: 16
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Migrations Organiser
[![Total Downloads](https://img.shields.io/packagist/dt/JayBizzle/Laravel-Migrations-Organiser.svg?style=flat-square)](https://packagist.org/packages/jaybizzle/Laravel-Migrations-Organiser)
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
========
- Laravel 5.3-6.* use `v4.*`
- Laravel 7.* use `v5.*`
- Laravel 8 & 9 use `v6.*`Installation
============```
composer require jaybizzle/laravel-migrations-organiser
```Add the following to the `providers` array in your `config/app.php` file..
```PHP
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](https://ga-beacon.appspot.com/UA-72430465-1/Laravel-Migrations-Organiser/readme?pixel)](https://github.com/JayBizzle/Laravel-Migrations-Organiser)