{"id":24764459,"url":"https://github.com/seamapi/seam-pgm","last_synced_at":"2025-10-11T14:30:40.595Z","repository":{"id":214427511,"uuid":"657837514","full_name":"seamapi/seam-pgm","owner":"seamapi","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-24T02:45:27.000Z","size":607,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-01T15:56:19.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/seamapi.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-24T01:34:17.000Z","updated_at":"2025-04-24T02:45:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"09bb6135-20b9-4927-8a0e-9ee2bf284446","html_url":"https://github.com/seamapi/seam-pgm","commit_stats":null,"previous_names":["seamapi/seam-pgm"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/seamapi/seam-pgm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-pgm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-pgm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-pgm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-pgm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seamapi","download_url":"https://codeload.github.com/seamapi/seam-pgm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-pgm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007457,"owners_count":26084313,"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-10-11T02:00:06.511Z","response_time":55,"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":[],"created_at":"2025-01-28T22:31:22.624Z","updated_at":"2025-10-11T14:30:40.583Z","avatar_url":"https://github.com/seamapi.png","language":"TypeScript","readme":"# seam-pgm (Seam node-pg-migrate)\n\nSeam uses node-pg-migrate to run database migrations.\n\nnode-pg-migrate requires some custom commands/setup to be compatible with\nthe typical seam configuration. Namely...\n\n- Use Typescript\n- Put migrations in `src/db/migrations`\n- \"Standard Shorthands\" for uuids and `created_at` timestamps\n- Code to automatically run migrations in tests\n- Automatic zapatos/kysely type generation\n- Reset database and migrate scripts\n- Automatic `src/db/zapatos` which dumps the database structure\n- Automatic `src/db/structure` which dumps the database structure\n\nThis module encapsulates all that functionality into one, easy-to-use\nmodule.\n\n## Usage\n\n### Scripts\n\n\u003e Note: `seam-node-pg-migrate` is abbreviated to `seam-pgm`, either is valid\n\u003e as an executable\n\n- `seam-pgm init` - Set up a project to use `seam-pgm`\n- `seam-pgm install-scripts` - Install scripts to package.json\n- `seam-pgm create-migration` - create new migration\n- `seam-pgm reset` - drop database and recreate, then migrate\n- `seam-pgm migrate` - migrate database\n- `seam-pgm generate` - migrate database and generate new types and structure\n\n### Config\n\nBy running `seam-pgm init` you'll automatically get a config generated, here's\nwhat you can customize:\n\n```ts\nmodule.exports = {\n  defaultDatabase: \"mydb\",\n  schemas: [\"main\"],\n\n  // Directory to store migrations, structure and database utility files\n  dbDir: \"./src/db\", // optional\n\n  // Directory to store zapatos schema\n  zapatosDir: \"./src/db/zapatos\", // optional\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fseam-pgm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseamapi%2Fseam-pgm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fseam-pgm/lists"}