Closed kkharji closed 1 year ago
Depending on what database you are using, you may need to put passwordHash
in quotes like "UserAuth"
. Not a prisma thing, just a SQL thing.
As for multiple statements, I'm not entirely sure but I don't think so. You may need to split up each statement and then batch them.
I managed to somehow to execute the file using docker and postgres cli.
@kkharji is this issue still relevant? Not exactly clear whether the suggestion to use quotes fixed the problem or not, but I'm pretty sure postgres ignores capitalisation unless you use quotes.
@Brendonovich I'm not sure, haven't tried it after managed to pull of a hack to execute a sql file into postgres docker container. It would be great if this are kept open till multiple sql statement or sql file can be executed.
It would be great if this are kept open till multiple sql statement or sql file can be executed.
Sending multiple SQL statements isn't something I'm going to cater towards and atm neither is Prisma. Sending a whole file is entirely out of scope too, just load it in and execute it yourself. If you need to execute multiple raw queries then construct them individually and batch them.
Okay, indeed it's out of the scope of this issue. Closing ..
Hello,
I've been trying to execute raw query.
Error:
"column "passwordhash" of relation "UserAuth" does not exist"
._execute_raw seems to change the casing.I'm using
0.6.2
~~additionally, does execute_raw works with multiple statements? without any params passed? I want to execute multiple sql statement from a sql file~~
db error: ERROR: cannot insert multiple commands into a prepared statement
Thanks