{"repo":"fatkodima/online_migrations","free":true,"listed":false,"github":"https://github.com/fatkodima/online_migrations","clone":"git clone https://github.com/fatkodima/online_migrations.git","description":"Catch unsafe PostgreSQL migrations in development and run them easier in production (code helpers for table/column renaming, changing column type, adding columns with default, background migrations, etc).","language":"Ruby","stars":756,"topics":["rails","activerecord","postgresql","migrations","gem","ruby"],"license":"MIT","category":"databases-storage","readme_excerpt":"OnlineMigrations Catch unsafe PostgreSQL migrations in development and run them easier in production. :white check mark: Detects potentially dangerous operations\\ :white check mark: Prevents them from running by default\\ :white check mark: Provides instructions and helpers on safer ways to do what you want Note : You probably don't need this gem for smaller projects, as operations that are unsafe at scale can be perfectly safe on smaller, low-traffic tables. Cool, but there is a strong migrations already See comparison to strong migrations Requirements - Ruby 3.3+ - Rails 7.2+ - PostgreSQL 12+ For older Ruby and Rails versions you can use older versions of this gem. Note : Since some migration helpers use database VIEW s to implement their logic, it is recommended to use structure.sql schema format, or otherwise add some gem (like scenic) to be able to dump them into the schema.rb . Installation Add this line to your application's Gemfile: And then run: Note : If you do not have plans on using background data migrations or background schema migrations features, then you can delete the generated migration and regenerate it later, if needed. Upgrading If you're already using background data migrations or background schema migrations, your background migrations tables may require additional columns. After every upgrade run: Motivation Writing a safe migration can be daunting. Numerous articles have been written on the topic and a few gems are trying to address the problem. Even ","default_branch":null,"files":null,"tree":[],"storefront":"/r/fatkodima","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fatkodima/online_migrations/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}