https://github.com/umbrellio/rollback-missing-migrations
Package allows to rollback migrations between different releases of the project
https://github.com/umbrellio/rollback-missing-migrations
Last synced: about 1 year ago
JSON representation
Package allows to rollback migrations between different releases of the project
- Host: GitHub
- URL: https://github.com/umbrellio/rollback-missing-migrations
- Owner: umbrellio
- License: mit
- Created: 2021-01-02T15:09:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-15T20:24:53.000Z (almost 2 years ago)
- Last Synced: 2024-09-15T21:33:21.865Z (almost 2 years ago)
- Language: PHP
- Homepage:
- Size: 45.9 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rollback Missing Migrations for Laravel
###### Laravel package for rolling back migrations between different releases
[](https://github.com/umbrellio/rollback-missing-migrations/actions)
[](https://coveralls.io/github/umbrellio/rollback-missing-migrations?branch=master)
[](https://packagist.org/packages/umbrellio/rollback-missing-migrations)
[](https://packagist.org/packages/umbrellio/rollback-missing-migrations)
[](https://scrutinizer-ci.com/code-intelligence)
[](https://scrutinizer-ci.com/g/umbrellio/rollback-missing-migrations/build-status/master)
[](https://scrutinizer-ci.com/g/umbrellio/rollback-missing-migrations/?branch=master)
[](https://scrutinizer-ci.com/g/umbrellio/rollback-missing-migrations/?branch=master)
## Installation
__composer__
`composer require umbrellio/rollback-missing-migrations`
## Usage
In your **new** release directory:
`php artisan rollback_missing_migrations:rollback `
- `` - absolute path to artisan command in previous release
Example:
`php artisan rollback_missing_migrations:rollback /projects/old_release/your_app/artisan`
If your migrations files locate in the custom directory you can use optional parameters:
- `--path` - path where your migration files locate in **current** release
- `--old-path` - path where your migration files locate in **old** release
- `--realpath` - this flag indicates, how `--path` and `--old-path` formats (absolute or relative) will be recognized
Example with a relative path:
```
php artisan rollback_missing_migrations:rollback /projects/old_release_app/artisan \
--old-path=database/old_custom_folder \
--path=database/custom_migration_folder
```
Example with an absolute path:
```
php artisan rollback_missing_migrations:rollback /projects/old_release/your_app/artisan \
--old-path=/projects/old_release/your_app/database/old_custom_folder \
--path=/new_release/your_app/database/custom_migration_folder \
--realpath
```
In case if you need rollback new migrations different from origin/master, you can use `rollback_new_migrations:rollback`
## Authors
Created by Art4es & Korben Dallas.