Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync migrations #25

Merged
merged 2 commits into from
Sep 14, 2023
Merged

Sync migrations #25

merged 2 commits into from
Sep 14, 2023

Conversation

carletex
Copy link
Collaborator

Since we merged #24 schema.prisma was out of sync with the migrations files, so runningprisma migrate dev was creating a new migration file (removing the the index & the default value) + failing to apply.

What I did:

  • Start with an empty database
  • prisma migrate deploy (to import the existing migration file, without checking the schema)
  • prisma db pull to introspect the database (it auto-updated the schema.prisma file)

With this, everything runs smoothly now! I also updated the README with the new migrate instructions.

@vercel
Copy link

vercel bot commented Sep 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
collectivedaoarchives-catalog ✅ Ready (Inspect) Visit Preview Sep 14, 2023 2:29pm

@carletex
Copy link
Collaborator Author

Also removed shadowDatabaseUrl = env("POSTGRES_URL_NON_POOLING") from schema.prisma which is not needed anymore, and it was causing an error:

1 migration found in prisma/migrations

Error: P3005

The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline

(see prisma/prisma#19234)

@carletex carletex merged commit 050b017 into main Sep 14, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant