nexusql 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -3217,6 +3217,13 @@ var Database = class _Database {
3217
3217
  for (const ext of extensions) {
3218
3218
  try {
3219
3219
  await this.exec(`CREATE EXTENSION IF NOT EXISTS "${ext}";`);
3220
+ const result = await this.queryParams(
3221
+ `SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = $1) as exists`,
3222
+ [ext]
3223
+ );
3224
+ if (!result.rows[0]?.exists) {
3225
+ throw new Error(`Extension "${ext}" was not installed`);
3226
+ }
3220
3227
  } catch (error) {
3221
3228
  const message = error instanceof Error ? error.message : String(error);
3222
3229
  throw new Error(