Hi!
We've been using Prisma 2 since the beta and something weird has happened twice now.
We have two models that contains properties/fields with the name "type" (without " ofc). One of those two models sometimes loose it's db column called type. It just disappears during a migration. And it always happens on one of those two, but it doesn't happen every time we run migrations.
Any clues?
j
janpio
08/11/2020, 8:22 AM
Always the same ones?
Do you have a migration file for the migration that is dropping the column?
Are you getting a warning about potential data loss?
b
Billy Ohgren
08/11/2020, 1:01 PM
Always the same, and I found the issue! .. Someone had made manual changes to the schema in one of the migrations, which means that the steps.json weren't up to date
Billy Ohgren
08/11/2020, 1:01 PM
thanks for replying!
j
janpio
08/11/2020, 1:35 PM
Uh wow.
janpio
08/11/2020, 1:35 PM
ping @Alberto Perdomo - you might want to understand that use case or exactly how this happened
b
Billy Ohgren
08/12/2020, 9:22 AM
I guess the rule is, never touch the generated migration files 🙂
Billy Ohgren
08/12/2020, 9:22 AM
That's what I've told my co-workers
j
janpio
08/12/2020, 12:54 PM
Smart statement 😄
😂 1
janpio
08/12/2020, 12:54 PM
We are currently revamping Migrations completely, so this might be valuable input.
b
Billy Ohgren
08/12/2020, 12:55 PM
cool!
a
Alberto Perdomo
08/12/2020, 2:49 PM
Thanks for the ping @janpio!
Hello @Billy Ohgren, would you be interested in jumping on a call some time this week or next? I will DM you with more details!