{"id":22481660,"url":"https://github.com/db-journey/journey","last_synced_at":"2025-08-02T16:30:58.252Z","repository":{"id":57494800,"uuid":"81150092","full_name":"db-journey/journey","owner":"db-journey","description":"Journey migration tool","archived":false,"fork":false,"pushed_at":"2023-12-19T15:50:17.000Z","size":5271,"stargazers_count":101,"open_issues_count":0,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-20T17:51:40.716Z","etag":null,"topics":["cli","cron","database","golang","migration"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/db-journey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-02-07T00:59:02.000Z","updated_at":"2024-05-19T12:08:30.000Z","dependencies_parsed_at":"2024-06-19T00:18:41.107Z","dependency_job_id":"b4400627-29bf-41bb-b108-163255f1f946","html_url":"https://github.com/db-journey/journey","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db-journey%2Fjourney","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db-journey%2Fjourney/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db-journey%2Fjourney/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db-journey%2Fjourney/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/db-journey","download_url":"https://codeload.github.com/db-journey/journey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228491963,"owners_count":17928719,"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":["cli","cron","database","golang","migration"],"created_at":"2024-12-06T16:14:49.458Z","updated_at":"2024-12-06T16:14:50.089Z","avatar_url":"https://github.com/db-journey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Journey\n\n[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n[![Build Status](https://travis-ci.org/db-journey/journey.svg?branch=master)](https://travis-ci.org/db-journey/journey)\n[![GoDoc](https://godoc.org/github.com/db-journey/journey?status.svg)](https://godoc.org/github.com/db-journey/journey)\n\nJourney is based on the work of @mattes on his tool \"migrate\": https://github.com/mattes/migrate/\n\n## __Features__\n\n* Super easy to implement [Driver interface](http://godoc.org/github.com/db-journey/migrate/v2/driver#Driver).\n* Gracefully quit running migrations on ``^C``.\n* No magic search paths routines, no hard-coded config files.\n* CLI is build on top of the ``migrate`` package.\n* Migration files templating\n\n\n## Available Drivers\n\n * [PostgreSQL](https://github.com/db-journey/postgresql-driver)\n * [Cassandra](https://github.com/db-journey/cassandra-driver)\n * [SQLite](https://github.com/db-journey/sqlite3-driver)\n * [MySQL](https://github.com/db-journey/mysql-driver) ([experimental](https://github.com/mattes/migrate/issues/1#issuecomment-58728186))\n * Bash (planned)\n\nNeed another driver? Just implement the [Driver interface](http://godoc.org/github.com/db-journey/migrate/v2/driver#Driver) and open a PR.\n\n## Usage from Terminal\n\n```bash\n# install\ngo get github.com/db-journey/journey/v2\n\n# create new migration file in path\njourney --url driver://url --path ./migrations migrate create migration_file_xyz\n\n# apply all available migrations\njourney --url driver://url --path ./migrations migrate up\n\n# roll back all migrations\njourney --url driver://url --path ./migrations migrate down\n\n# roll back the most recently applied migration, then run it again.\njourney --url driver://url --path ./migrations migrate redo\n\n# run down and then up command\njourney --url driver://url --path ./migrations migrate reset\n\n# show the current migration version\njourney --url driver://url --path ./migrations migrate version\n\n# apply the next n migrations\njourney --url driver://url --path ./migrations migrate migrate +1\njourney --url driver://url --path ./migrations migrate migrate +2\njourney --url driver://url --path ./migrations migrate migrate +n\n\n# roll back the previous n migrations\njourney --url driver://url --path ./migrations migrate migrate -1\njourney --url driver://url --path ./migrations migrate migrate -2\njourney --url driver://url --path ./migrations migrate migrate -n\n\n# go to specific migration\njourney --url driver://url --path ./migrations migrate goto 1\njourney --url driver://url --path ./migrations migrate goto 10\njourney --url driver://url --path ./migrations migrate goto v\n```\n\n## CronJobs\n\nJourney also provides a command to run scheduled jobs on databases:\n\n\n```bash\njourney --url driver://url --path ./cronjobs scheduler start\n```\n\n## Migration files templating\n\nJourney supports dynamic migrations files, by using go templates.\n\nIf a file in the migrations folder has the extension `.tpl` (it must match the driver file extensions, so `.sql.tpl` for sql drivers), it will parsed and executed using journey current environment.\n\nExample:\n\n```bash\n$ echo \"create table {{.TABLE}} (id int64, name text);\" \u003e\u003e files/20170707204006_template.up.sql.tpl\n$ TABLE=a_table journey migrate\n```\n\nFor more information about go templating, refer to the official doc: https://golang.org/pkg/text/template/\n\nThis feature is particularly usefull to avoid leaving sensitive data in migrations, or to make adjustments based on current environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb-journey%2Fjourney","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdb-journey%2Fjourney","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb-journey%2Fjourney/lists"}