Replies: 2 comments 1 reply
-
For me, this error was because my migrations user did not have permission to create a schema (drizzle.__drizzle_migrations) in the database. I allowed the same with below and it worked. GRANT CREATE ON DATABASE <db> to <migrationsuser>; I wish drizzle along with permission denied error message, prints the SQL command it was trying to execute - that would have allowed easier troubleshooting. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@sz3lbi did you ever figure this out? There's another thread here #3353 that seems to be related. In my case, my |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a problem when using Drizzle ORM with PostgreSQL and the
postgres
package as the PostgreSQL client.I have my PostgreSQL running as a Podman container. Then I've created a schema of the database and generated my first migration.
When I try to apply these migrations, I get the following error, no matter if I use the
drizzle-kit migrate
command or the "code-based" solution via themigrate.ts
file (pnpm run migrate
):PostgresError: permission denied for database XYZ
. When I connect to the database withpsql
on the same user, I can create enums and database tables without any problem.HOWEVER, the
drizzle-kit push
command works just fine. All of the tables are created and I can see them using DBeaver as my client (which, by the way, is logged in with exactly the same credentials).For any information about the code, please take a look at the repository of my project: https://codeberg.org/szelbi/classifieds-service-backend-typescript/src/commit/6b93d1104c1ed08bbe59e9a0b8d6cff198b42d06
Could you please tell me what could be the problem here?
Beta Was this translation helpful? Give feedback.
All reactions