#Data Loss Warning

16 messages · Page 1 of 1 (latest)

dense sparrow
#

Hello!

I'm trying ot migrate my project to Payload 2.0 but every time I make a change I fgot this message about data loss. Most of the time the server crashes and I need to close the tab and open a new one. And when the server restarts, I am redirected to the Welcome screen and I need to create a user again.

Is anyone else going through this?

snow oasisBOT
river frigate
#

I see the same error using a new Supabase / Payload project. I assume this is why I have to create a new first user every time I start the payload server.

fallow halo
#

@potent ferry Any ideas here?

potent ferry
#

Not sure off the top of my head. If you look at the db table before accepting the warning, does it have one row with the email column set to something?

#

This message comes from drizzle which is attempting to push schema changes on the fly.

#

For context, we are piping those prompts through.

dense sparrow
potent ferry
#

We are doing some supabase compatibility testing later in the week. I'm going to take a look at this likely tomorrow.

river frigate
# potent ferry Not sure off the top of my head. If you look at the db table before accepting th...

Yes, here's what happens:

  1. Spin up a clean example.
  2. Create the first user: [email protected].
  3. Kill the dev terminal process with ctrl+c.
  4. In Supabase, the user collection shows a single row with "email" set to [email protected]. (img attached)
  5. Restart the server with yarn dev
  6. See the You're about to set not-null constraint error in the terminal.

environment:

  • yarn v1.22.19
  • node v18.14.2
  • wsl2 (Ubuntu)
potent ferry
#

I don't know why it would be related. I will try and recreate this just with local postgres before doing anything with supa.

tropic wraith
#

I get the exact same error when using Supabase on every yarn dev. I tested a local postgres database, with it it works with no problems.

fallow halo
#

I believe there are some intricacies to working with Supabase that will need to be worked through that are causing this

tropic wraith
#

Was testing it also with postgres on vercel (uses neon db I believe), this works too 👍

dreamy sequoia
#

ressurrecting here, having the same problem. using Supabase too.