{"id":20481171,"url":"https://github.com/stolen-ruby/conflict_free_schema","last_synced_at":"2025-07-23T23:04:15.125Z","repository":{"id":45067906,"uuid":"349190723","full_name":"stolen-ruby/conflict_free_schema","owner":"stolen-ruby","description":"Conflict free-schema solution for your Rails app that is running on top of Postgresql","archived":false,"fork":false,"pushed_at":"2024-11-12T06:06:38.000Z","size":42,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T07:42:33.976Z","etag":null,"topics":["postgresql","rails","schema-migrations"],"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/stolen-ruby.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-03-18T19:14:32.000Z","updated_at":"2024-11-12T05:47:20.000Z","dependencies_parsed_at":"2022-08-26T09:42:36.128Z","dependency_job_id":null,"html_url":"https://github.com/stolen-ruby/conflict_free_schema","commit_stats":null,"previous_names":["stolen-ruby/conflict-free-schema"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stolen-ruby/conflict_free_schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stolen-ruby%2Fconflict_free_schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stolen-ruby%2Fconflict_free_schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stolen-ruby%2Fconflict_free_schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stolen-ruby%2Fconflict_free_schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stolen-ruby","download_url":"https://codeload.github.com/stolen-ruby/conflict_free_schema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stolen-ruby%2Fconflict_free_schema/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266764547,"owners_count":23980583,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["postgresql","rails","schema-migrations"],"created_at":"2024-11-15T16:07:13.224Z","updated_at":"2025-07-23T23:04:15.103Z","avatar_url":"https://github.com/stolen-ruby.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![71wdVdp0ncL](https://user-images.githubusercontent.com/1527612/111843245-1a0d8b80-8901-11eb-987a-f382d2396f8d.jpg)\n\n### Why stolen ruby?\n\n_Stolen ruby_ is an idea behind extracting open-source code into more accessible packages. I noticed that a lot of interesting projects have quite a lot of brilliant code that is unfortunately often _embedded_ into the source and never extracted - which is a shame because often it's very useful stuff and a lot of different people could benefit from it. The idea is to change that - extract those hidden gems and publish them into the world.\n\n_Note: cover stolen [from well known book](https://austinkleon.com/steal/)._\n\n# conflict_free_schema\n\n![status](https://github.com/stolen-ruby/conflict_free_schema/actions/workflows/ci.yml/badge.svg)\n\n**Stolen from:** [GitLab](https://gitlab.com); references: [merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30109#65c74abf34b80b85fc4b56a98b029c7e2d884bac), [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/218590)\n\nOriginal author: Patrick Bair; extracted code with very minor modifications, added higher-level Rails integrations tests on top\n\n## Requirements\n\nRails 6+ with postgresql\n\n## Installation\n\nAdd the following to your `Gemfile`:\n\n~~~ruby\ngem 'conflict_free_schema'\n~~~\n\nThen install the gem using bundle:\n\n~~~bash\nbundle install\n~~~\n\nGem will auto-hook into your rails app via `Rails::Railtie`\n\n## What does it do?\n\n\u003e Remove conflicts from structure.sql that are caused by tracking the schema_migrations.versions information. To do this, store an empty file named after each version under the db/schema_migrations directory. That way when we versions are added or removed, we add or delete files from the directory, which should not conflict with other changes.\n\nIf you're using `structure.sql` in your Rails project with postgresql - instead of putting schema version in the sql file upon dump, each migration will be stored as a separate file in `db/schema_migrations` (with a SHA hash as content so it's a unique file from git's perspective). If you're doing a lot of structure changes across your organization it should make the life of your developers much easier - resolving conflicts in structure is pain already - even without the need to resolve schema migrations version numbers.\n\n## Development\n\nYou can spin up docker-based development environment with provided `docker-compose` file (useful for Apple M1 users) or simply install dependencies locally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstolen-ruby%2Fconflict_free_schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstolen-ruby%2Fconflict_free_schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstolen-ruby%2Fconflict_free_schema/lists"}