PHP Classes

Laravel Migration Rollback: Revert one or more database migrations

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 31 All time: 11,097 This week: 455Up
Version License PHP version Categories
laravel-revert-migra 1.0.0The PHP License5PHP 5, Databases, Libraries
Description 

Author

This package can revert one or more database migrations.

It provides a Laravel service provider that can execute a given database migration or revert a given migration executed before.

This service provider can also execute migrations on a specific folder.

Innovation Award
PHP Programming Innovation award nominee
December 2019
Number 10
Migrations are steps that applications need to give to evolve the application database to a newer version.

If for some reason it is necessary to go back to a past version of an application, reverting the effects of a migrations will allow applications to go back to the state of a database where it was before a migration was performed.

This package provides means to revert a given migration when using the Laravel framework to develop a given application.

Manuel Lemos
Picture of Zacchaeus Bolaji
  Performance   Level  
Name: Zacchaeus Bolaji <contact>
Classes: 17 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 245415 in Nigeria Nigeria
Week rank: 44 Up3 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 12x

Winner: 1x

Documentation

Laravel Revert DB Migrate

Laravel Revert DB Migrate gives you the option to run a specific migration or run migrations in a specified folder. it also allows you revert specific migration(s)

Installation

You can install the package via composer:

composer require djunehor/laravel-revert-migration

Laravel 5.5 and above

The package will automatically register itself, so you can start using it immediately.

Laravel 5.4 and older

In Laravel version 5.4 and older, you have to add the service provider in config/app.php file manually:

'providers' => [
    // ...
    Djunehor\CherryPick\CherryPickMigrateServiceProvider::class,
];

Lumen

After installing the package, you will have to register it in bootstrap/app.php file manually:

// Register Service Providers
    // ...
    $app->register(Djunehor\CherryPick\CherryPickMigrateServiceProvider::class);
];

Usage

After installing the package, you will now see a new `php artisan migrate:cherrypick` command.

Migrate specific file

You can migrate a specific file inside your database/migrations folder using:


### Migrate specific directory

You can migrate a specific directory inside your `database/migrations` folder using:

Reverting migrations

You can revert migrations inside your project using:


## Credits

- Md. Hasan Sayeed

 For any questions, you can reach out to the author of this package, Zacchaeus Bolaji.

 Thank you for using it.

  Files folder image Files (5)  
File Role Description
Files folder imagesrc (1 file, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (5)  /  src  
File Role Description
Files folder imageConsole (1 file, 1 directory)
  Plain text file CherryPickMigrateServiceProvider.php Class Class source

  Files folder image Files (5)  /  src  /  Console  
File Role Description
Files folder imageCommands (1 file)
  Plain text file Kernel.php Class Class source

  Files folder image Files (5)  /  src  /  Console  /  Commands  
File Role Description
  Plain text file CherryPickMigrateCommand.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:31
This week:0
All time:11,097
This week:455Up