{"id":20980519,"url":"https://github.com/hyperjumptech/prisma-migration-checker","last_synced_at":"2025-09-01T13:42:13.366Z","repository":{"id":102269842,"uuid":"567631605","full_name":"hyperjumptech/prisma-migration-checker","owner":"hyperjumptech","description":"CLI tool to check if new Prisma migrations can be applied safely to the database","archived":false,"fork":false,"pushed_at":"2023-03-04T21:58:17.000Z","size":21,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-13T10:17:15.018Z","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/hyperjumptech.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":"2022-11-18T08:02:11.000Z","updated_at":"2022-11-18T08:41:24.000Z","dependencies_parsed_at":"2023-06-16T21:45:48.687Z","dependency_job_id":null,"html_url":"https://github.com/hyperjumptech/prisma-migration-checker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hyperjumptech/prisma-migration-checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fprisma-migration-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fprisma-migration-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fprisma-migration-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fprisma-migration-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjumptech","download_url":"https://codeload.github.com/hyperjumptech/prisma-migration-checker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Fprisma-migration-checker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273136172,"owners_count":25051999,"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-01T02:00:09.058Z","response_time":120,"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":"2024-11-19T05:28:59.742Z","updated_at":"2025-09-01T13:42:13.316Z","avatar_url":"https://github.com/hyperjumptech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prisma Migration Checker\n\n## About\n\nPrisma Migration Checker is a CLI tool to check if new Prisma migrations can be applied safely to the database.\n\n## Motivation\n\nWhen you use Prisma in your web app, you might have encountered [failed migrations](https://www.prisma.io/docs/guides/database/production-troubleshooting#failed-migration) when deploying the migrations to the production database. While Prisma has documented the methods to fix this issue, it's not easy and straightforward. \n\nIt'd have much better if you can check if the new migrations will succeed **before** actually deploying the migrations, say in your CI/CD pipeline. This is where Prisma Migration Checker comes to play.\n\n# Installation\n\nPrisma Migration Checker is developed using Node.js and TypeScript. So you can install it from the NPM as follows\n\n```\nnpm install -g @hyperjumptech/prisma-migration-checker\n```\n\n# Usage\n\n## Directly\n\nYou need to provide two schema files which are the schema file with the new migrations and another schema file without the new migrations.\n\n```\nprisma-migration-checker --new \u003cpath_to_the_new_schema\u003e --current \u003cpath_to_the_existing_schema\u003e\n```\n\nNote that before running Prisma Migration Checker, you need to:\n- have the database used in your prisma.schema running (Postgres, MongoDB, SQLite, etc).\n\n## In CI Pipeline\n\nTo check if a schema.prisma file that was changed in a pull request, you can checkout first the schema.prisma from the main branch before running Prisma Migration Checker in your CI pipeline.\n\n```\ngit show main:prisma/schema.prisma \u003e prisma/schema-main.prisma\nprisma-migration-checker --new prisma/schema.prisma --current prisma/schema-main.prisma\n```\n\n# Development\nclone the repo.\n\nif you want to use `prisma-seeder` locally, you can build it by running `npm pack --pack-destination ~` in the `prisma-seeder` directory.\nThen find the generated file on `~/hyperjumptech-prisma-seeder-0.0.3.tgz` (version is defined in package.json). Then update your `package.json \u003e dependences`\n\n```\n\"dependencies\": {\n    ...\n    \"@hyperjumptch/prisma-seeder\": \"file:~/hyperjumptech-prisma-seeder-0.0.3.tgz\",\n    ...\n  }\n```\n\nthen install dependencies using\n\n```\nnpm install\n```\n\nthen run this to start the package\n\n```\n./bin/dev --new \u003cpath_to_the_new_schema\u003e --current \u003cpath_to_the_existing_schema\u003e --database-url \u003curl_of_the_database\u003e\n```\n\n# How It Works\n\n1. Prisma Migration Checker will apply the current migrations to the database.\n2. It will then populate the database with fake data.\n3. Finally it will apply the new migrations from the new schema file.\n\n# License \n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Fprisma-migration-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjumptech%2Fprisma-migration-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Fprisma-migration-checker/lists"}