{"id":20388551,"url":"https://github.com/efureev/db-migrator","last_synced_at":"2025-11-30T19:05:38.901Z","repository":{"id":64306318,"uuid":"318173911","full_name":"efureev/db-migrator","owner":"efureev","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-31T14:02:46.000Z","size":158,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T09:02:26.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/efureev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-03T11:39:49.000Z","updated_at":"2024-10-31T14:02:43.000Z","dependencies_parsed_at":"2024-10-28T11:15:10.220Z","dependency_job_id":null,"html_url":"https://github.com/efureev/db-migrator","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Fdb-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Fdb-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Fdb-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Fdb-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efureev","download_url":"https://codeload.github.com/efureev/db-migrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940541,"owners_count":20045878,"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":[],"created_at":"2024-11-15T03:11:23.611Z","updated_at":"2025-11-30T19:05:38.869Z","avatar_url":"https://github.com/efureev.png","language":"Go","readme":"# Migrator\n\nDocker/Binary-file to help you manage migrations into your DB.\n\n## Features\n\n- Create migration with custom name: `./migrate create -n 'create user table'`\n- Migrate up your migrations: `./migrate up`\n- Migrate down your migrations: `./migrate down`\n- Refresh all migrations: `./migrate fresh`\n- Clean all tables in your DB: `./migrate wipe`\n- Migrations Version: `./migrate db:version`\n- App Version: `./migrate version`\n\n## Image\n\n| Registry                                            | Image                     |\n|-----------------------------------------------------|---------------------------|\n| [GitHub Container Registry][link_github_containers] | `ghcr.io/efureev/migrate` |\n| [Docker Hub][link_docker_tags]                      | `feugene/migrate`         |\n\n\u003e Images, based on the `alpine` image has a postfix `-alpine` in the tag name, e.g.: `feugene/migrate:1.4.8-alpine`.\n\nFollowing platforms for this image are available:\n\n```shell\ndocker run --rm mplatform/mquery feugene/migrate:latest\n```\n\n**Supported platforms**:\n\n- linux/amd64\n- linux/386\n- linux/arm64\n- linux/arm/v7\n- linux/arm/v8\n\n## Use\n\n```shell\ndocker run --rm --network host \\\n  -v ./migrations:/migrations \\\n  -v ./config.yaml:/tmp/config.yaml \\\n  feugene/migrate:latest -f /tmp/config.yaml status\n```\n\nYou can define config file (yaml) `-f /tmp/config.yaml`:\n\n```yaml\nmigrations:\n  dir: \"./migrations\"\n\ndatabase:\n  host: \"localhost\"\n  port: 5432\n  name: \"dbname\"\n  user: \"user\"\n  pass: \"\"\n```\n\nOr use OS Envs:\n\n```shell\ndocker run --rm --network host \\\n  -v ./migrations:/migrations \\\n  -e DB_USER=fureev \\\n  -e DB_NAME=testdb \\\n  feugene/migrate:latest create -n 'create user table'\n```\n\nList of all Env vars:\n\n- DB_HOST=localhost\n- DB_PORT=5432\n- DB_USER=\n- DB_PASS=\n- DB_NAME=\n- MIGRATION_DIR=/migrations\n\n\n\u003eEnv-variables have higher priority over config-file.\n\n## For Developers\n\n### Build\n\n```shell\n./build.sh\n```\n\n## Examples\n\n```shell\n$ ./migrate --help\n$ ./migrate version\n$ ./migrate create -n file_name\n$ ./migrate create --name='create users table'\n$ ./migrate up\n$\n$ MIGRATION_DIR=./custom ./migrate up \n```\n\n```shell\nDB_HOST=pg DB_PORT=5434 DB_USER=fureev DB_NAME=test MIGRATION_DIR=./migrations migrate \n```\n\n[link_docker_tags]:https://github.com/efureev/db-migrator/tags\n[link_github_containers]:https://github.com/efureev/db-migrator/pkgs/container/migrate","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Fdb-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefureev%2Fdb-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Fdb-migrator/lists"}