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.

Bug: Constraints not well-handled by Studio

See original GitHub issue

I am not sure if this is an issue with Prisma or Blitz or Supabase.

When I run blitz prisma migrate dev, the default value for id is set in Supabase to extval('"User_id_seq" (truncated—exactly like that).

This is the corresponding schema in Prisma: id Int @id @default(autoincrement()).

Is this a bug? Or am I doing something wrong?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kiwicopplecommented, Jul 20, 2022
CREATE TABLE "Test" (
    "id" BIGSERIAL NOT NULL,

    CONSTRAINT "Test_pkey" PRIMARY KEY ("id")
);

I see - they are adding it as constraint, and it seems that Studio isn’t great at handling constraints. This is a bug for us to fix! I’ll edit the title and let the Frontend team know

See also: https://github.com/supabase/supabase/issues/7653

We don’t handle multiple constraints very well

0reactions
joshenlimcommented, Sep 27, 2022

just fyi, this is happening as the dashboard is attempting to do some formatting against the default value of the column to remove the type cast incorrectly - i’ll look into a temp fix for this, but the longer term fix that I’ll look into as well is just have the Column side panel editor not do formatting from PG’s side (e.g not formatting 'some text'::text to 'some text', just leave it as it is)

ref ColumnEditor.utils.ts -> unescapeLiteral at line 199

Read more comments on GitHub >

github_iconTop Results From Across the Web

CGDive - YouTube
Blender Bug (2.8/2.9/3.0) - Constraints gone missing ... press ctrl+z once you will restore the bone but NOT the properties that were on...
Read more >
Hardest types of bugs to track? [closed] - Stack Overflow
I'm currently trying to debug why an application has an unhandled exception in a try{} catch{} block (yes, unhandled inside of a try...
Read more >
Scripts runs on Windows server, but not through Jenkins
When I run the script from the Jenkins master, forcing it to be executed in the slave, it gives me an error when...
Read more >
SMT solving for the validation of B and Event-B models
This translation uses quantifiers to axiomatize some operators, which are not well-handled by Z3. Several relational constraints such as the ...
Read more >
EasyCP library Homepage
Many useful functions are not available, such as the division. Int variables constrained to values beyoung ]-oo, +oo[ can lead to an error....
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