How to alter database with drizzle (sql magic operator)?
Hi everyone,
I am trying to use the sql magic operator to alter a postgres database, but no luck yet.
Here's what I am trying to do:
However, I am getting
PostgresError: syntax error at or near "$1"
, looks like this operator does not support to use variables when using ALTER DATABASE
.
Any solution on how to actually perform this operation? It is only running on script (CI/CD), it is not exposed to the public, so security here isn't a huge concern.
Thank you!1 Reply
Just found what I should use:
${sql.raw(databaseName)}
If it helps someone ☝️