-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ERROR: relation "user" does not exist
while running diesel migration/print-schema
#3673
Comments
We missed a quote in a table name before casting the table name to `regclass`. This causes postgres to coerce the table name to lowercase, which causes the query to seek for a non-existing table. This fixes diesel-rs#3673.
We missed a quote in a table name before casting the table name to `regclass`. This causes postgres to coerce the table name to lowercase, which causes the query to seek for a non-existing table. This fixes diesel-rs#3673.
We missed a quote in a table name before casting the table name to `regclass`. This causes postgres to coerce the table name to lowercase, which causes the query to seek for a non-existing table. This fixes diesel-rs#3673.
We missed a quote in a table name before casting the table name to `regclass`. This causes postgres to coerce the table name to lowercase, which causes the query to seek for a non-existing table. This fixes diesel-rs#3673.
I am curious if there is a possibility to get a point release with the fixed version. At the moment it does affects some of my projects and the last diesel release is 3 months old. Happy to help if there is a way (e.g backporting the patch). For now I’ll run nightly. |
@dsp I plan to do a patch release for this as soon as a couple of other issues are fixed as well. This includes #3579 and #3643. I cannot comment on how long that takes because it really depends on how much contributions there are and how much time I personally find to work on that kind of stuff. Any help there would be great. |
Setup
My pg dump
Versions
cargo 1.70.0 (ec8a8a0ca 2023-04-25)
rustc 1.70.0 (90c541806 2023-05-31)
diesel 2.1.0
postgresql 15.3-1.pgdg120+1
ArcoLinux kernel 6.3.8-arch1-1
Feature Flags
Problem Description
I encountered an error while running
diesel print-schema
/diesel migration run
on my old database after installing the diesel-cli. I was attempting to switch from a TypeScript project that utilized Prisma as the database driver to a Rust project with Diesel as the database driver. Since starting from scratch and recreating everything would be a significant amount of work, my intention was to reuse my existing database. However, I faced difficulties during the process.What are you trying to accomplish?
diesel print-schema
What is the actual output?
relation "user" does not exist
Steps to reproduce
with prisma installed
without prisma installed
Temporary fix:
Making all tables lowercase seems to fix the problem:
working migration
working prisma
Checklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: