nexusql 0.9.0 → 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,7 +3217,20 @@ 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
- } catch {
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
+ }
3227
+ } catch (error) {
3228
+ const message = error instanceof Error ? error.message : String(error);
3229
+ throw new Error(
3230
+ `Failed to install extension "${ext}": ${message}
3231
+ Make sure the extension is installed on your PostgreSQL server.
3232
+ For pgvector: https://github.com/pgvector/pgvector#installation`
3233
+ );
3221
3234
  }
3222
3235
  }
3223
3236
  }