{"id":37859043,"url":"https://github.com/zaccari/rake-task-migrations","last_synced_at":"2026-01-16T16:30:21.106Z","repository":{"id":54861165,"uuid":"49584219","full_name":"zaccari/rake-task-migrations","owner":"zaccari","description":"Run rake tasks as migrations for Ruby on Rails","archived":false,"fork":false,"pushed_at":"2022-08-11T17:57:10.000Z","size":62,"stargazers_count":12,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T17:53:38.855Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/zaccari.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":"2016-01-13T15:55:38.000Z","updated_at":"2023-03-05T01:45:26.000Z","dependencies_parsed_at":"2022-08-14T05:00:48.968Z","dependency_job_id":null,"html_url":"https://github.com/zaccari/rake-task-migrations","commit_stats":null,"previous_names":["mzaccari/rake-migrations","mzaccari/rake-task-migrations"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/zaccari/rake-task-migrations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaccari%2Frake-task-migrations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaccari%2Frake-task-migrations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaccari%2Frake-task-migrations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaccari%2Frake-task-migrations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaccari","download_url":"https://codeload.github.com/zaccari/rake-task-migrations/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaccari%2Frake-task-migrations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-16T16:30:16.239Z","updated_at":"2026-01-16T16:30:21.001Z","avatar_url":"https://github.com/zaccari.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/rake-task-migration.svg)](https://badge.fury.io/rb/rake-task-migration)\n[![Build Status](https://travis-ci.org/zaccari/rake-task-migrations.svg?branch=master)](https://travis-ci.org/zaccari/rake-task-migrations)\n[![Maintainability](https://api.codeclimate.com/v1/badges/08bba999a702ca78e7b2/maintainability)](https://codeclimate.com/github/mzaccari/rake-task-migrations/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/08bba999a702ca78e7b2/test_coverage)](https://codeclimate.com/github/mzaccari/rake-task-migrations/test_coverage)\n\n# Rake Task Migrations\n\nHeavily based on the `seed_migration` gem [found here](https://github.com/harrystech/seed_migration).\n\nFor rails projects that need to run tasks on deployment that don't quite fit in the `db:migrate` and `seed:migrate` categories, this gem migrates specified rake tasks and ensures they only run once.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rake-task-migration'\n```\n\nAnd then execute:\n\n    $ bundle\n\nInstall and run the internal migrations\n\n    $ bundle exec rake task_migration:install:migrations\n    $ bundle exec rake db:migrate\n\nThat will create the table to keep track of rake task migrations.\n\n## Usage\n\nCreate the `lib/tasks/migrations.rake` file and add your tasks:\n\n```ruby\nnamespace :migrations do\n  task :migrate_user_names =\u003e :environment do\n    User.find_each do |user|\n      user.update_attributes(name: \"#{user.first_name} #{user.last_name}\")\n    end\n  end\nend\n```\n\nThen run the migration task:\n\n```\n$ bundle exec rake tasks:migrate\n== migrate_user_names: migrating =============================================\n== migrate_user_names: migrated (0.0191s) ====================================\n```\n\nEach rake task is run only once.\n\n## Configuration\n\nUse an initializer file for configuration.\n\n### List of available configurations :\n\n- `migration_table_name (default = 'rake_task_migrations')`\n- `migration_namespace (default = :migrations)`\n\n#### Example:\n\n```ruby\n# config/initializers/rake_task_migration.rb\n\nRake::TaskMigration.config do |config|\n  config.migration_table_name = 'table_name'\n  config.migration_namespace  = 'namespace'\nend\n```\n\n## Runnings tests\n\n```bash\nexport RAILS_ENV=test\nexport DB=mysql # or sqlite, postgresql\nbundle exec rake app:db:create app:db:migrate\nbundle exec rspec spec\n```\n\n* Rubies: 2.5, 2.6\n* Rails: 5.0, 5.1, 5.2, 6.0\n* Databases: MySQL, SQLite, PostgreSQL\n\nFor more information see the [travic-ci config](https://github.com/zaccari/rake-task-migrations/blob/master/.travis.yml).\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## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaccari%2Frake-task-migrations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaccari%2Frake-task-migrations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaccari%2Frake-task-migrations/lists"}