Open Sata51 opened 1 year ago
For who will hit the same issue, we find a temporary workaround using this function to retrieve the current schema name
export const getSchemaName = (schema: SchemaModule) => {
let name = 'public';
schema.createTable('test').$call(b => {
name = b.toOperationNode().table.table.schema?.name ?? 'public';
});
return name;
};
Hey 👋
Once https://github.com/kysely-org/kysely/commit/b481619c633910541bd18aa78570e091669db185 gets released you'll be able to inject non-select queries built with builders into sql
template tags like this.
Looks like support for sql.table
wasn't implemented in WithSchemaPlugin
. It creates a TableNode
, so there's no good reason (that I can think of) to not transform it as well and add the schema name.
Hi,
We are currently trying to have a custom migration that runs everytime
reagardless
the current migration step. This migration will hold the last version of somestored procedure
. Thesestored procedure
must run using thelatest
constant
from our codebase.We work with schema for testing purpose and we are doing the following
The compiled query does not contains any information about the schema provided by using:
Is there any way to use the right schema ?
Thanks