nexusql 0.9.2 → 0.9.3
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 +15 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3414,7 +3414,18 @@ async function gen(options = {}) {
|
|
|
3414
3414
|
try {
|
|
3415
3415
|
spinner.start("Installing extensions...");
|
|
3416
3416
|
await tempDb.installExtensions(config.extensions);
|
|
3417
|
-
|
|
3417
|
+
if (config.extensions.includes("vector")) {
|
|
3418
|
+
const vectorCheck = await tempDb.query(
|
|
3419
|
+
"SELECT typname FROM pg_type WHERE typname = 'vector'"
|
|
3420
|
+
);
|
|
3421
|
+
if (vectorCheck.rows.length === 0) {
|
|
3422
|
+
spinner.fail("Vector extension installed but vector type not found!");
|
|
3423
|
+
throw new Error(
|
|
3424
|
+
"pgvector extension was installed but the 'vector' type is not available. This usually means pgvector is not properly installed on your PostgreSQL server."
|
|
3425
|
+
);
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
spinner.succeed("Installed db extensions");
|
|
3418
3429
|
spinner.start("Loading schema into temp database...");
|
|
3419
3430
|
await tempDb.exec(targetSql);
|
|
3420
3431
|
spinner.succeed("Loaded schema into temp database");
|
|
@@ -3453,6 +3464,9 @@ ${commentSql}` : `-- Comment changes
|
|
|
3453
3464
|
${commentSql}`;
|
|
3454
3465
|
}
|
|
3455
3466
|
spinner.succeed("Checked comment changes");
|
|
3467
|
+
} catch (error) {
|
|
3468
|
+
spinner.fail("Failed to generate migration diff");
|
|
3469
|
+
throw error;
|
|
3456
3470
|
} finally {
|
|
3457
3471
|
spinner.start("Cleaning up temp database...");
|
|
3458
3472
|
try {
|