{"id":16055708,"url":"https://github.com/theodorton/veksel","last_synced_at":"2025-09-05T21:32:38.154Z","repository":{"id":224679746,"uuid":"762976396","full_name":"theodorton/veksel","owner":"theodorton","description":"Database branching for Rails","archived":false,"fork":false,"pushed_at":"2025-08-14T07:41:28.000Z","size":70,"stargazers_count":2,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T02:19:17.147Z","etag":null,"topics":["development-tools","neon","pg","postgresql","rails"],"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/theodorton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-25T08:11:09.000Z","updated_at":"2025-08-14T07:40:40.000Z","dependencies_parsed_at":"2024-03-25T07:29:20.399Z","dependency_job_id":"9079c857-909a-42d4-a819-91621153286b","html_url":"https://github.com/theodorton/veksel","commit_stats":null,"previous_names":["theodorton/veksel"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/theodorton/veksel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fveksel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fveksel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fveksel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fveksel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodorton","download_url":"https://codeload.github.com/theodorton/veksel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fveksel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273826119,"owners_count":25175232,"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-09-05T02:00:09.113Z","response_time":402,"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":["development-tools","neon","pg","postgresql","rails"],"created_at":"2024-10-09T02:21:38.408Z","updated_at":"2025-09-05T21:32:38.130Z","avatar_url":"https://github.com/theodorton.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/veksel.svg)](https://rubygems.org/gems/veksel)\n[![Build status](https://github.com/theodorton/veksel/actions/workflows/test.yml/badge.svg?branch=main\u0026event=push)](https://github.com/theodorton/veksel/actions?query=event%3Apush+branch%3Amain)\n\n# Veksel: Database branching for Rails\n\nVeksel keeps seperate databases for every branch in your development environment. This makes it easy to experiment with schema changes and data with less risk and avoid conflicting changes to `schema.rb` when branches have different sets of migrations. The inspiration for the gem came from [branch support in Neon](https://neon.tech/docs/manage/branches).\n\nPostgresql is currently the only supported database driver.\n\n## Usage\n\nOut of the box, Veksel requires explicit invocation to work. Refer to [Git hook](#git-hook) below if you're interested in a more automated approach.\n\nCheckout a new branch and run `bundle exec veksel fork`. A new database with a suffix matching your branch name will be created and `tmp/restart.txt` will be touched so your application servers restart. Both database structure and contents will be copied from your primary development database and Veksel will tell Rails on boot that the forked database should be used.\n\nWhen moving back to your `main` branch, run `touch tmp/restart.txt` to make Rails connect to default development database.\n\n### Veksel tasks\n\nThe CLI supports the following commands\n\n```\nveksel fork                        Create a forked database\nveksel clean                       Delete forked databases\nveksel fork                        Fork the database from the main branch\nveksel list                        List forked databases\n```\n\nYou can also run the commands as rake tasks (e.g. `bin/rails veksel:list`), albeit with a penalty hit.\n\n## Git hook\n\nAdd the following to `.git/hooks/post-checkout` to automatically fork your database when checking out a branch:\n\n```\n#!/bin/sh\nbundle exec veksel fork\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"veksel\", group: :development\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install veksel\n```\n\n## Roadmap\n\n- Promote a forked database to main\n- Explicit/optional branching\n- Other database drivers\n\n## Release process\n\n```shell\n# Bump version number in lib/veksel/version.rb\n\n# Update lockfile\nbundle install\n\n# Update changelog, review manually before committing\nconventional-changelog -p conventionalcommits -i CHANGELOG.md -s\ngit commit -m 'chore(release): x.y.z'\ngit push origin\ngit tag vx.y.z\ngit push origin vx.y.z\n\n# Build and push gem\ngem build\ngem push veksel-x.y.z.gem\n\n# Upload the veksel-x-y-z.gem file to the Github release page\n```\n\n## Sponsors\n\nVeksel is sponsored by [Skalar](https://github.com/Skalar)\n\n## License\n\nVeksel is licensed under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorton%2Fveksel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodorton%2Fveksel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorton%2Fveksel/lists"}