Download the PHP package ziming/laravel-specific-migrate-fresh without Composer
On this page you can find all versions of the php package ziming/laravel-specific-migrate-fresh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ziming/laravel-specific-migrate-fresh
More information about ziming/laravel-specific-migrate-fresh
Files in ziming/laravel-specific-migrate-fresh
Package laravel-specific-migrate-fresh
Short Description Migrate Fresh for Specific Tables Only
License MIT
Homepage https://github.com/ziming/laravel-specific-migrate-fresh
Informations about the package laravel-specific-migrate-fresh
Laravel Specific Migrate:Fresh
Want php artisan migrate:fresh
but not drop all the tables? This is for you.
Support me
Donations are welcomed.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
Go to the config file, choose your preferred mode ('exclude' or 'include').
Fill in the relevant array ('excluded_tables' or 'included_tables').
Go to your migrations and for the tables you do not want to drop, in the up() method, add in a conditional check
to skip the migration if the table still exists. You need to do this so that php artisan migrate
will not
throw an error about the table or column already exist later.
And call the command below. The --seed
option is optional.
The end of this command simply just call the php artisan migrate --seed
command at the end.
If you do not want to call your DatabaseSeeder. Leave out --seed
from your command.
Testing
PRs are welcomed on this
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- ziming
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-specific-migrate-fresh with dependencies
illuminate/contracts Version ^9.0||^10.0||^11.0
spatie/laravel-package-tools Version ^1.13.0
staudenmeir/laravel-migration-views Version ^1.6||^1.7