Download the PHP package yusufalper/laravel-subfolder-migrations without Composer
On this page you can find all versions of the php package yusufalper/laravel-subfolder-migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yusufalper/laravel-subfolder-migrations
More information about yusufalper/laravel-subfolder-migrations
Files in yusufalper/laravel-subfolder-migrations
Package laravel-subfolder-migrations
Short Description Organize your migrations into subfolders.
License MIT
Homepage https://github.com/yusufalper/laravel-subfolder-migrations
Informations about the package laravel-subfolder-migrations
Organize your migrations into subfolders.
IF YOU DO NOT WANT TO USE PACKAGE FOR THIS FEATURE, YOU CAN USE SIMPLE PROVIDER GIST FROM HERE
This package allows you to split database/migrations into subfolders. Especially in large projects, migrations folder may cause headaches.
Now you can turn this:
-
database
-
- migrations
-
-
- 2019_08_19_000000_create_users_table.php
-
-
-
- 2019_08_19_000000_create_user_xs_table.php
-
-
-
- 2019_08_19_000000_create_user_ys_table.php
-
-
-
- 2019_08_19_000000_create_companies_table.php
-
-
-
- 2019_08_19_000000_create_company_zs_table.php
-
-
-
- 2019_08_19_000000_create_company_ts_table.php
-
into this:
-
database
-
- migrations
-
-
- company_migrations
-
-
-
-
- 2019_08_19_000003_create_companies_table.php
-
-
-
-
-
- 2019_08_19_000004_create_company_zs_table.php
-
-
-
-
-
- 2019_08_19_000005_create_company_ts_table.php
-
-
-
-
- user_migrations
-
-
-
-
- 2019_08_19_000000_create_users_table.php
-
-
-
-
-
- 2019_08_19_000001_create_user_xs_table.php
-
-
-
-
-
- 2019_08_19_000002_create_user_ys_table.php
-
-
Directory order is not important, the only important thing is naming migration files as before. Package will scan all migration folder with all subfolders and will do the migrations in order. In the example above, the first file to run will be "2019_08_19_000000_create_users_table.php".
Installation
You can install the package via composer:
And you are good to go! You can run your migration commands as just like before. For example:
Note:
If you don't have auto discovery enabled, you should add the following to config/app.php "providers" array:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-subfolder-migrations with dependencies
spatie/laravel-package-tools Version ^1.9.2
illuminate/contracts Version ^9.0|^10