0.0
No commit activity in last 3 years
No release in over 3 years
Improve development experience of rollbacking Rails missing migrations
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0
 Project Readme

GhostSchema

DO NOT USE THIS GEM IN PRODUCTION.

This gem is intended to be used under development environment.

Installation

gem 'ghost_schema'

Usage

Switching between development branches may causes you following errors.

$ bin/rails db:migrate:status

database: xxx_development

 Status   Migration ID    Migration Name
--------------------------------------------------
   up     20171019092851  Init schema
(snip)
   up     20180319070119  Remove columns
   up     20180330010101  ********** NO FILE **********

$ bin/rails db:rollback VERSION=20180330010101
rails aborted!
ActiveRecord::UnknownMigrationVersionError:

No migration with version number 20180330010101.

This gem copies migration files when you run db:migrate. If you want to run db:migrate:down for missing migration file, you can do by running db:ghost:migrate:down.

$ bin/rails db:ghost:migrate:down VERSION=20180330010101
== 20180330010101 AddAwesomeColumns: reverting ==============
(snip)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/meganemura/ghost_schema.

License

The gem is available as open source under the terms of the MIT License.