How do I load sqlite extensions for drizzle-kit?

I'm getting SqliteError: unknown function: ulid_with_prefix() when running drizzle-kit migrate due of the ulid extension I'm using. How do I load the extension within drizzle kit?
6 Replies
patwoz
patwozOP3mo ago
and how can I say drizzle-kit NOT to use the default sqlite of macos but from another path?
Angelelz
Angelelz3mo ago
There is no api in drizzle for such a thing You have to load your extension yourself by following sqlite instructions As for your second question, the driver will use the sqlite that it has available Maybe take out the path of the default sqlite from the PATH variable and making sure to add the one that you loaded the extension on
patwoz
patwozOP3mo ago
But how? I'm already loading the extension on my own in my source code, but drizzle-kit doesn't use my code to make the connection to the database ah ok....just don't use kit migrate but create a migrate.ts file for that purpose
Angelelz
Angelelz3mo ago
I think you should be able to use kit migrate You would just have to adjust the PATH variable in your .zshrc file
patwoz
patwozOP3mo ago
but that doesn't load the required sqlite extensions
Angelelz
Angelelz3mo ago
Cc @Andrew Sherman
Want results from more Discord servers?
Add your server