{"id":22368342,"url":"https://github.com/olexnzarov/sqlc-pgx-migrate-template","last_synced_at":"2025-09-05T06:34:24.646Z","repository":{"id":241885845,"uuid":"808118048","full_name":"olexnzarov/sqlc-pgx-migrate-template","owner":"olexnzarov","description":"A boilerplate template for the sqlc, pgx/v5, golang-migrate libraries","archived":false,"fork":false,"pushed_at":"2024-05-31T21:07:39.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T16:12:38.135Z","etag":null,"topics":["example","golang-migrate","pgx","sqlc","template"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olexnzarov.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-05-30T12:22:34.000Z","updated_at":"2024-06-07T16:19:15.000Z","dependencies_parsed_at":"2024-05-31T22:26:23.539Z","dependency_job_id":"dcf5d579-95a5-438d-892a-b27a16fcb10a","html_url":"https://github.com/olexnzarov/sqlc-pgx-migrate-template","commit_stats":null,"previous_names":["olexnzarov/sqlc-pgx-migrate-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/olexnzarov/sqlc-pgx-migrate-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexnzarov%2Fsqlc-pgx-migrate-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexnzarov%2Fsqlc-pgx-migrate-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexnzarov%2Fsqlc-pgx-migrate-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexnzarov%2Fsqlc-pgx-migrate-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olexnzarov","download_url":"https://codeload.github.com/olexnzarov/sqlc-pgx-migrate-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexnzarov%2Fsqlc-pgx-migrate-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273722976,"owners_count":25156300,"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":["example","golang-migrate","pgx","sqlc","template"],"created_at":"2024-12-04T18:28:56.654Z","updated_at":"2025-09-05T06:34:24.588Z","avatar_url":"https://github.com/olexnzarov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqlc-pgx-migrate-template\nThis is a boilerplate template for the following combination of libraries: [sqlc](https://github.com/sqlc-dev/sqlc), [pgx/v5](https://github.com/jackc/pgx), [golang-migrate](https://github.com/golang-migrate/migrate). This is just one of the many examples of how to use these libraries together — don't consider this as the single right way of doing things and tinker around with them yourself.\n\n**How to use this code?**\n\n- Put your migrations into the `internal/db/migrations` directory.\n- Put your queries into the `internal/db/queries` directory and add them to the `sqlc.yaml` configuration.\n- Use the `db.Setup` function to run the migrations and get the pgx connection pool.\n\n## Running the example\n\n```sh\n# To start the example application\n$ docker-compose up -d\n\n# To stop the example application\n$ docker-compose down\n```\n\n```sh\n$ curl localhost:8080/authors\n\n[{\"ID\":\"7e96f8fc-c2c6-4844-a588-9bd14b066ffc\",\"Name\":\"Robert Jordan\",\"Description\":null,\"AverageRating\":4.225}]\n```\n\n## Cleaning up the template\n\n```sh\n# To remove the example application, its Docker files, this README file, and initialize a new git repository.\n# Do not forget to delete this rule after you've run it.\n$ make cleanup-template\n\n# To change the module name.\n$ go mod edit -module github.com/you/your-repository\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folexnzarov%2Fsqlc-pgx-migrate-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folexnzarov%2Fsqlc-pgx-migrate-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folexnzarov%2Fsqlc-pgx-migrate-template/lists"}