No commit activity in last 3 years
No release in over 3 years
To archive migration files to another folder
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

ArchiveMigration

Archive ruby migration files.

Installation

Run

$ gem install archive_migration

Usage

Run the following command to execute archive:

archive_migration

The ArchiveMigration takes following steps:

  • create new folder /archive, move all up to date migrations to this folder by year
  • create new file with latest migration version number and all code in schema.rb
  • delete old version numbers in schema_migrations table to avoid rake db:migrate:status have ***NO FILE*** output.

This gem also supports following options:

Supported options:
    -y                               already run all migrations
    -m, --migrate                    run migrations and then archive
    -d, --delete                     delete version list from schema_migrations table
    -r, --recover                    redo all archive actions (in progress)
    -z, --zip                        zip archive folder (next version)
    -p, --push                       push archive folder to S3 (next version)
    -v, --version                    show gem version
    -h, --help                       show this message

Next step

  • add logic to redo all archive actions
  • add logic to zip archive folder
  • allow user to push archived zip/folder to S3

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/NathanShi/archive_migration. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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

Code of Conduct

Everyone interacting in the ArchiveMigration project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.