@ragpipe/plugin-supabase
Advanced tools
+13
-13
@@ -153,2 +153,9 @@ "use strict"; | ||
| } | ||
| if (setupOptions?.force) { | ||
| import_consola.consola.warn("Dropping and recreating table with --force..."); | ||
| return applyMigration( | ||
| generateRecreateSQL(sqlOptions), | ||
| "ragpipe_recreate" | ||
| ); | ||
| } | ||
| const currentDims = parseVectorDimension(rows[0].vector); | ||
@@ -161,16 +168,9 @@ if (currentDims === dimensions) { | ||
| } | ||
| if (!setupOptions?.force) { | ||
| import_consola.consola.error( | ||
| `Dimension mismatch: table has ${currentDims}, config requires ${dimensions}.` | ||
| ); | ||
| import_consola.consola.info( | ||
| "Run with --force to drop and recreate (existing data will be lost)." | ||
| ); | ||
| return; | ||
| } | ||
| import_consola.consola.warn("Dropping and recreating table with --force..."); | ||
| return applyMigration( | ||
| generateRecreateSQL(sqlOptions), | ||
| "ragpipe_recreate" | ||
| import_consola.consola.error( | ||
| `Dimension mismatch: table has ${currentDims}, config requires ${dimensions}.` | ||
| ); | ||
| import_consola.consola.info( | ||
| "Run with --force to drop and recreate (existing data will be lost)." | ||
| ); | ||
| return; | ||
| } | ||
@@ -177,0 +177,0 @@ return applyMigration(generateSetupSQL(sqlOptions), "ragpipe_init"); |
+13
-13
@@ -125,2 +125,9 @@ // src/vector-store.ts | ||
| } | ||
| if (setupOptions?.force) { | ||
| consola.warn("Dropping and recreating table with --force..."); | ||
| return applyMigration( | ||
| generateRecreateSQL(sqlOptions), | ||
| "ragpipe_recreate" | ||
| ); | ||
| } | ||
| const currentDims = parseVectorDimension(rows[0].vector); | ||
@@ -133,16 +140,9 @@ if (currentDims === dimensions) { | ||
| } | ||
| if (!setupOptions?.force) { | ||
| consola.error( | ||
| `Dimension mismatch: table has ${currentDims}, config requires ${dimensions}.` | ||
| ); | ||
| consola.info( | ||
| "Run with --force to drop and recreate (existing data will be lost)." | ||
| ); | ||
| return; | ||
| } | ||
| consola.warn("Dropping and recreating table with --force..."); | ||
| return applyMigration( | ||
| generateRecreateSQL(sqlOptions), | ||
| "ragpipe_recreate" | ||
| consola.error( | ||
| `Dimension mismatch: table has ${currentDims}, config requires ${dimensions}.` | ||
| ); | ||
| consola.info( | ||
| "Run with --force to drop and recreate (existing data will be lost)." | ||
| ); | ||
| return; | ||
| } | ||
@@ -149,0 +149,0 @@ return applyMigration(generateSetupSQL(sqlOptions), "ragpipe_init"); |
+1
-1
| { | ||
| "name": "@ragpipe/plugin-supabase", | ||
| "version": "0.3.0", | ||
| "version": "0.4.0", | ||
| "description": "Supabase pgvector vector store plugin for ragpipe", | ||
@@ -5,0 +5,0 @@ "type": "module", |
20236
-0.05%