KyselyK
Kysely3y ago
capaj

Error this query cannot be compiled to SQL

I am trying to do

          await trx.executeQuery(
            sql<any>`ALTER SCHEMA ${current.subdomain} RENAME TO ${subdomain};`
          )
        }


anybody have an idea how to do this query?
Solution
I the end I went with
 await sql
           .raw(`ALTER SCHEMA "${current.subdomain}" RENAME TO "${subdomain}"`)
            .execute(trx)
Was this page helpful?