{"id":13879496,"url":"https://github.com/ioquatix/activerecord-migrations","last_synced_at":"2025-05-06T21:49:27.173Z","repository":{"id":59150372,"uuid":"75903595","full_name":"ioquatix/activerecord-migrations","owner":"ioquatix","description":"A gem to simplify activerecord migrations in non-rails projects.","archived":false,"fork":false,"pushed_at":"2020-09-29T08:49:39.000Z","size":45,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T22:06:42.956Z","etag":null,"topics":["activerecord","activerecord-migrations","database","rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ioquatix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-08T04:42:57.000Z","updated_at":"2020-12-23T08:28:06.000Z","dependencies_parsed_at":"2022-09-13T11:00:27.541Z","dependency_job_id":null,"html_url":"https://github.com/ioquatix/activerecord-migrations","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioquatix%2Factiverecord-migrations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioquatix%2Factiverecord-migrations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioquatix%2Factiverecord-migrations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioquatix%2Factiverecord-migrations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ioquatix","download_url":"https://codeload.github.com/ioquatix/activerecord-migrations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776507,"owners_count":21802463,"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","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","activerecord-migrations","database","rails"],"created_at":"2024-08-06T08:02:22.895Z","updated_at":"2025-05-06T21:49:27.106Z","avatar_url":"https://github.com/ioquatix.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# ActiveRecord::Migrations\n\nThis gem provides opinionated support for ActiveRecord migrations in non-Rails applications. It's more opinionated than [active_record_migrations](https://github.com/rosenfeld/active_record_migrations) and [standalone-migrations](https://github.com/thuss/standalone-migrations), and therefore simpler to configure.\n\n[![Build Status](https://travis-ci.com/ioquatix/activerecord-migrations.svg)](https://travis-ci.com/ioquatix/activerecord-migrations)\n[![Code Climate](https://codeclimate.com/github/ioquatix/activerecord-migrations.svg)](https://codeclimate.com/github/ioquatix/activerecord-migrations)\n[![Coverage Status](https://coveralls.io/repos/ioquatix/activerecord-migrations/badge.svg)](https://coveralls.io/r/ioquatix/activerecord-migrations)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'activerecord-migrations'\n```\n\n## Usage\n\nAdd something like this to `tasks/db.rake`\n\n```ruby\nrequire 'active_record/migrations/tasks'\n# The root must be the root of your application, and contain `db/`.\nActiveRecord::Migrations.root = File.dirname(__dir__)\n```\n\nSomewhere else, ensure you have a suitable `environment` task, e.g:\n\n```ruby\ntask :environment do\n\t# This must be a symbol... or establish_connection thinks it's a URL.\n\tDATABASE_ENV = :development\n\t\n\tActiveRecord::Base.configurations = {\n\t\t# This key must be a string or it will not be matched by ActiveRecord:\n\t\t'development' =\u003e {\n\t\t\t# Using symbols for keys is fixed by this gem.\n\t\t\tadapter: 'sqlite3',\n\t\t\tdatabase: 'db/development.db'\n\t\t}\n\t}\n\t\n\t# Connect to database:\n\tunless ActiveRecord::Base.connected?\n\t\tActiveRecord::Base.establish_connection(DATABASE_ENV)\n\tend\nend\n```\n\n### Deployment\n\nThis gem includes an additional task `db:deploy` which is designed to assist with deployment of sites with databases. When deploying a site for the first time, this task will create the database and load the seed data, then run any outstanding migrations. If deploying the site to an existing database it will simply run migrations.\n\nThe typical usage is to run `db:fixtures:update` which will generate all the required files into `db/fixtures/$DATABASE/`, which includes the contents of all tables and the current `schema.rb`.\n\n### Fixtures\n\nFixtures are generated into `db/fixtures/$DATABASE_ENV/$TABLE_NAME.yml` by running `rake db:fixtures:dump`. You can limit this to specific tables by editing `db/fixtures/$DATABASE_ENV/tables.conf` which is loaded if present, or by specifying `TABLES=table1,table2` environment variable.\n\n### Seed\n\nThis gem replaces the existing data seed mechanism with `db:fixtures:load`.\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## See Also\n\n- [ActiveRecord::Rack](https://github.com/ioquatix/activerecord-rack)\n\n## License\n\nReleased under the MIT license.\n\nCopyright, 2016, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioquatix%2Factiverecord-migrations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fioquatix%2Factiverecord-migrations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioquatix%2Factiverecord-migrations/lists"}