Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dfop02/rails-migrate-factory
Completely rebuild your migrations to agilize setup and simplify schema
https://github.com/dfop02/rails-migrate-factory
Last synced: 5 days ago
JSON representation
Completely rebuild your migrations to agilize setup and simplify schema
- Host: GitHub
- URL: https://github.com/dfop02/rails-migrate-factory
- Owner: dfop02
- License: mit
- Created: 2023-01-08T21:23:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-04T22:31:43.000Z (5 months ago)
- Last Synced: 2024-08-05T00:15:26.164Z (5 months ago)
- Language: Ruby
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Rails Migrate Factory
Completely rebuild your migrations to agilize setup and simplify schema## Install
`gem install migrate_factory_rails`
or add to your `Gemfile`
```ruby
group :development do
gem 'migrate_factory_rails'
end
```## How use
**Be careful, rebuild do not cover all situations yet then may miss some migration**
You can use two commands currently:- `rake rebuild:migrations` -> Will rebuild all your migrations and save on `tmp/rebuild`, then you can validate if it worths without lose any data.
- `rake rebuild:cleanup` -> Will cleanup all data on `tmp/rebuild`.## Goals
My goal here was the challenge to rebuild every migrations from Rails, matching as close as possible the final `schema.rb` meanwhile reducing strongly the amount of migrations. Specially on old projects, there will be a lot ot migrations, sometimes for a single column or index which extends the setup for a few seconds. If is worth or not to use, feel free to discuss.
## Author
* [Diogo](https://github.com/dfop02)