question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in migration when updating enum

See original GitHub issue

Hi Prisma Team! Prisma Migrate just crashed.

Command

migrate dev

Versions

Name Version
Platform windows
Node v16.15.0
Prisma CLI 4.2.1
Engine 2920a97877e12e055c1333079b8d19cee7f33826

Error

Error: Error in migration engine.
Reason: [migration-engine\connectors\sql-migration-connector\src\sql_renderer\postgres_renderer.rs:908:22] We should only be setting a changed default if there was one on the previous schema and in the next with the same enum.

Please create an issue with your `schema.prisma` at
https://github.com/prisma/prisma/issues/new

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
PauloPrafcommented, Aug 30, 2022

Was this also about changing an enum for you @PauloPraf?

Yes, it was the same situation as described above.

0reactions
jkomynocommented, Sep 2, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration doesn't work when adding new value to enum and ...
Migration doesn't work when adding new value to enum and using new value as default, New enum values must be committed before they...
Read more >
Getting Entity Framework migration error with enum
It's a known issue that EntityFramework doesn't play well with enum values. I don't know that this works with code-first, ...
Read more >
Upgrading PostgreSQL's Enum type with ... - Makimo
In this tutorial we've successfully generated the migration file which can automatically upgrade enum types on PostgreSQL server. If you want to read...
Read more >
Error when updating schema enum type - Elixir Forum
Hi,. I previously had the below migration and schema with statuses [:start, :closed]. def up do update_statuses([:open, :closed], ...
Read more >
Postgres: Enum type fields | Hasura GraphQL Docs
As enum tables have a requirement to contain at least 1 row, it is necessary to have a migration which inserts values into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found