{"id":18871475,"url":"https://github.com/korzun/prisma-migrate-planetscale","last_synced_at":"2026-04-30T19:32:33.638Z","repository":{"id":184055403,"uuid":"420219503","full_name":"Korzun/prisma-migrate-planetscale","owner":"Korzun","description":"Automate Prisma Migrations on Planetscale","archived":false,"fork":false,"pushed_at":"2021-10-27T17:04:33.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-30T18:57:51.599Z","etag":null,"topics":["database"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Korzun.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}},"created_at":"2021-10-22T19:29:52.000Z","updated_at":"2021-11-22T11:40:47.000Z","dependencies_parsed_at":"2023-09-06T17:16:47.759Z","dependency_job_id":null,"html_url":"https://github.com/Korzun/prisma-migrate-planetscale","commit_stats":null,"previous_names":["korzun/prisma-migrate-planetscale"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Korzun/prisma-migrate-planetscale","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korzun%2Fprisma-migrate-planetscale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korzun%2Fprisma-migrate-planetscale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korzun%2Fprisma-migrate-planetscale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korzun%2Fprisma-migrate-planetscale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Korzun","download_url":"https://codeload.github.com/Korzun/prisma-migrate-planetscale/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korzun%2Fprisma-migrate-planetscale/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["database"],"created_at":"2024-11-08T05:26:02.267Z","updated_at":"2026-04-30T19:32:33.614Z","avatar_url":"https://github.com/Korzun.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prisma Migrate for PlanetScale\n\n[Prisma](https://www.prisma.io) and [PlanetScale](https://planetscale.com) have some helpful documentation to get you started. What they don't offer are examples of how a migration might be run in production. This repo aims to add some ready-made free-to-use scripts to get you migratin'.\n\n## Existing Documentation\n\nIf this is your first time integrating Prisma with PlanetScale, follow their existing documentation. When you're ready to start migrating in production, then come back here.\n\n* [Using Prisma with a PlanetScale database #7292](https://github.com/prisma/prisma/issues/7292)\n* [Automatic Prisma Migrations](https://docs.planetscale.com/tutorials/automatic-prisma-migrations)\n\n## Pre-Requisites\n\nTo use the contained scripts, you'll need to create a service token using the Planetscale CLI and give it the following permissions for the database you want to migrate. **Note:** You must complete this step using the CLI. It seems the PlanetScale Web UI is unreliable at setting these permissions.\n\n* `connect_branch`\n* `create_branch`\n* `create_deploy_request`\n* `delete_branch`\n* `read_branch`\n\n## Gotchas'\n\n* Setting PlanetScale service token permissions via the Web UI is unreliable. The permissions will appear, but they won't work with the CLI.\n* Repeatedly creating and deleting a PlanetScale branch of the same name will introduce CLI connection issues. These scripts use the date or a short-sha to dodge this issue.\n* The PlanetScale's CLI creates an environmental variable `DATABASE_URL` when using the `pscale connect` command. This variable will overwrite any existing variable of the same name. This behavior can cause some [head-scratching](https://github.com/prisma/prisma/issues/7341).\n* The PlanetScale CLI doesn't allow pull-requests to be created despite having the correct permissions.\n* The PlanetScale CLI `connect` command doesn't wait for a newly created branch to be available, it just fails to connect. These scripts wait 10 seconds to side-step this issue.\n* The PlanetScale CLI won't install on `node:lts-alpine` as it reports as `musl-linux-amd64` instead of `amd64`. Using the `dpkg` `--force-architecture` flag works.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorzun%2Fprisma-migrate-planetscale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkorzun%2Fprisma-migrate-planetscale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorzun%2Fprisma-migrate-planetscale/lists"}