{"id":15723700,"url":"https://github.com/sfsekaran/migrer","last_synced_at":"2025-10-25T08:43:10.267Z","repository":{"id":6133034,"uuid":"7361447","full_name":"sfsekaran/migrer","owner":"sfsekaran","description":"The polite data migration valet.","archived":false,"fork":false,"pushed_at":"2014-08-13T04:33:19.000Z","size":224,"stargazers_count":1,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-28T03:48:17.819Z","etag":null,"topics":["activerecord-migration","data-migration","database","database-migrations","migrer","rails","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sfsekaran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-29T00:31:54.000Z","updated_at":"2017-02-23T09:32:50.000Z","dependencies_parsed_at":"2022-07-05T20:33:39.546Z","dependency_job_id":null,"html_url":"https://github.com/sfsekaran/migrer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sfsekaran/migrer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfsekaran%2Fmigrer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfsekaran%2Fmigrer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfsekaran%2Fmigrer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfsekaran%2Fmigrer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sfsekaran","download_url":"https://codeload.github.com/sfsekaran/migrer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfsekaran%2Fmigrer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268475761,"owners_count":24256180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activerecord-migration","data-migration","database","database-migrations","migrer","rails","ruby"],"created_at":"2024-10-03T22:12:54.576Z","updated_at":"2025-10-25T08:43:10.208Z","avatar_url":"https://github.com/sfsekaran.png","language":"Ruby","readme":"# Migrer\n#### The polite data migration valet.\n\n### What's with the name?\n\nMigrer (me-gray) is French for migrate. My wife suggested the name, and it was much\nless obnoxious than `morphin_time` or  `flying_v`, say. - @sfsekaran\n\n## What is it?\n\nMigrer creates migration-like tasks for running application scripts. It is primarily useful for updating database\nrecords or running one-time tasks against separate environments.\n\n**What is the difference between this and ActiveRecord migrations?**\n\nMigrations should always be stable and are primarily for altering the structure of a database. Migrer is intended for\ndata migrations, or manipulating the data within that structure. Such tasks can become error-prone since they depend on\nthe state of models in the codebase, and are best not included in ActiveRecord migrations.\n\n**Why not just create a regular rake task or use a script runner?**\n\nAlthough Migrer data migrations can be run multiple times, they are primarily suited for one-time tasks (and often for\ntasks that are not intended to be run more than once). Migrer not only creates a structure for these one-time tasks,\nbut also keeps track of which data migrations have already been processed. This is especially useful when managing\nsuch tasks among multiple environments.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'migrer'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install migrer\n\nAnd install database migrations like so:\n\n    $ bundle exec rake railties:install:migrations FROM=migrer\n    $ bundle exec rake db:migrate\n\n## Configuration\n\nMigrer can be configured (e.g. in an initializer) as follows:\n\n```ruby\nMigrer.configure do |config|\n  config.paranoid = true\nend\n```\n\nConfiguration options:\n\n    paranoid (default: false) - If set to true, a prompt will be required before running each data migration.\n\n## Usage\n\n### 1) Create the data migration\n\nCreate a data migration:\n\n    $ bundle exec rails generate data_migration MyFirstDataMigration \"optional description\"\n\nThis will create the file:  db/data_migrate/\u0026lt;timestamp\u0026gt;_my_first_data_migration.rb\n\nOpen this file and replace \"TODO\" with your data migration code!\n\n### 2) Run a task\n\nUnless you have the RAILS_ENV environment variable already set, prepend this to all of the following commands (replace\n\u0026lt;environment\u0026gt; with the correct Rails environment (development, staging, production, etc.):\n\n    RAILS_ENV=\u003cenvironment\u003e\n\nNOTE: If the 'paranoid' configuration variable is set to true, or if the commands are run with the ```PARANOID=true``` environment variable, all the following commands will ask for confirmation before executing.\n\n**Run all unprocessed data migrations:**\n\n    bundle exec rake data:migrate\n\n**Run a single data migration (\u0026lt;version\u0026gt; is the timestamp at the beginning of the data migration file, just like\nActiveRecord migrations):**\n\n    bundle exec rake data:migration VERSION=\u003cversion\u003e\n\n**Mark all data migrations as already processed:**\n\n    bundle exec rake data:mark_all\n\n**Mark a single data migration as already processed:**\n\n    bundle exec rake data:mark VERSION=\u003cversion\u003e\n\n**Mark all data migrations as unprocessed (so they are included again when running data:migrate):**\n\n    bundle exec rake data:unmark_all\n\n**Mark a single data migration as unprocessed:**\n\n    bundle exec rake data:unmark VERSION=\u003cversion\u003e\n\n**View all unprocessed data migrations by filename:**\n\n    bundle exec rake data:pending\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## Contributors\n\n* *Sathya Sekaran* ([sfsekaran](https://github.com/sfsekaran))\n* *Michael Durnhofer* ([mdurn](https://github.com/mdurn))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfsekaran%2Fmigrer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfsekaran%2Fmigrer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfsekaran%2Fmigrer/lists"}