PHP Classes

Laravel Migration Rollback: Revert one or more database migrations

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 31 This week: 1All time: 11,009 This week: 560Up
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: 15 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 250415 in Nigeria Nigeria
Week rank: 411 Up10 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 10x

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  
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  /  src  
File Role Description
Files folder imageConsole (1 file, 1 directory)
  Plain text file CherryPickMigrateServiceProvider.php Class Class source

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

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:31
This week:1
All time:11,009
This week:560Up