{"id":13412017,"url":"https://github.com/lawzava/go-pg-migrate","last_synced_at":"2025-05-07T05:20:32.280Z","repository":{"id":45871152,"uuid":"330212301","full_name":"lawzava/go-pg-migrate","owner":"lawzava","description":"CLI-friendly package for pg migrations management.","archived":false,"fork":false,"pushed_at":"2023-10-09T20:46:34.000Z","size":53,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T06:41:21.788Z","etag":null,"topics":["cli","go","go-pg","golang","hacktoberfest","migrate","migration","migration-tool","migrations","postgresql"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/lawzava/go-pg-migrate","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/lawzava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["lawzava"]}},"created_at":"2021-01-16T17:01:32.000Z","updated_at":"2025-02-26T02:36:14.000Z","dependencies_parsed_at":"2024-01-30T04:07:14.498Z","dependency_job_id":"9c6ace6e-39a6-45bb-a9e9-2b26839415d5","html_url":"https://github.com/lawzava/go-pg-migrate","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawzava%2Fgo-pg-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawzava%2Fgo-pg-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawzava%2Fgo-pg-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawzava%2Fgo-pg-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lawzava","download_url":"https://codeload.github.com/lawzava/go-pg-migrate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252818644,"owners_count":21808889,"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","go","go-pg","golang","hacktoberfest","migrate","migration","migration-tool","migrations","postgresql"],"created_at":"2024-07-30T20:01:20.166Z","updated_at":"2025-05-07T05:20:32.260Z","avatar_url":"https://github.com/lawzava.png","language":"Go","funding_links":["https://github.com/sponsors/lawzava"],"categories":["Database","数据库","Uncategorized","Generators","Data Integration Frameworks"],"sub_categories":["Database Schema Migration","数据库模式迁移","Advanced Console UIs"],"readme":"![GolangCI](https://github.com/lawzava/go-pg-migrate/workflows/golangci/badge.svg?branch=main)\n[![Version](https://img.shields.io/badge/version-v2.0.0-green.svg)](https://github.com/lawzava/go-pg-migrate/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lawzava/go-pg-migrate)](https://goreportcard.com/report/github.com/lawzava/go-pg-migrate)\n[![Coverage Status](https://coveralls.io/repos/github/lawzava/go-pg-migrate/badge.svg?branch=main)](https://coveralls.io/github/lawzava/go-pg-migrate?branch=main)\n[![Go Reference](https://pkg.go.dev/badge/github.com/lawzava/go-pg-migrate.svg)](https://pkg.go.dev/github.com/lawzava/go-pg-migrate)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://awesome-go.com)\n\n\n# go-pg-migrate\n\nCLI-friendly package for PostgreSQL migrations management.\n\n## Installation\n\nRequires Go Modules enabled.\n\n```\ngo get github.com/lawzava/go-pg-migrate/v2\n```\n\n## Usage\n\nInitialize the `migrate` with options payload where choices are:\n\n- `DatabaseURI` database connection string. In a format of `postgres://user:password@host:port/database?sslmode=disable`.\n\n- `VersionNumberToApply` uint value of a migration number up to which the migrations should be applied. \nWhen the requested migration number is lower than currently applied migration number it will run backward migrations, otherwise it will run forward migrations.\n  \n- `PrintVersionAndExit` if true, the currently applied version number will be printed into stdout and the migrations will not be applied.\n\n- `ForceVersionWithoutMigrations` if true, the migrations will not be applied, but they will be registered as applied up to the specified version number.\n\n- `RefreshSchema` if true, public schema will be dropped and recreated before the migrations are applied. Useful for frequent testing and CI environments.\n\n## Example\n\nYou will find the example in [examples](examples) directory. The example is CLI-friendly and can be used as a base for CLI-based migrations utility.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawzava%2Fgo-pg-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flawzava%2Fgo-pg-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawzava%2Fgo-pg-migrate/lists"}