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
need to run db push twice in order to apply changes #7411
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
tech/typescript
Issue for tech TypeScript.
topic: prisma db push
CLI: prisma db push
Milestone
Comments
Jolg42
added
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
process/candidate
team/schema
Issue for team Schema.
topic: prisma db push
CLI: prisma db push
labels
Jun 2, 2021
I can reproduce this. Looks like it clears the tables but doesn't recreate them in the first run. Exact reproduction steps.
model User {
id String @id @default(cuid())
email String
name String?
}
model User {
id String @id @default(cuid())
email String
name String
}
|
pantharshit00
added
bug/2-confirmed
Bug has been reproduced and confirmed.
and removed
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
labels
Jun 15, 2021
Just for context, this happens because the CLI reapplies migrations after you reset, instead of |
Jolg42
added a commit
that referenced
this issue
Aug 2, 2021
Jolg42
added a commit
that referenced
this issue
Aug 3, 2021
Andrew-Colman
pushed a commit
to Andrew-Colman/prisma
that referenced
this issue
Aug 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
tech/typescript
Issue for tech TypeScript.
topic: prisma db push
CLI: prisma db push
Bug description
It happened many times to me already that I run db push, it says “:warning: We found changes that cannot be executed:” and “The PostgreSQL database “db” from “localhost:5340" was successfully reset.“, then I type y, and it says “Your database is now in sync with your schema.“.
However nothing changed. The changes are not applied.
Then I run db push again, it says once again “Your database is now in sync with your schema”, but now it actually is in sync, and some tables are correctly dropped.
How to reproduce
Expected behavior
changes to be applied immediately after running
db push
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: