Fix pg_trgm word similarly threshold even for the first session

This commit is contained in:
Zoe Roux
2025-02-22 18:39:13 +01:00
parent 1bca9f47dd
commit 9b526461c6
4 changed files with 5 additions and 8 deletions
+2
View File
@@ -21,6 +21,7 @@ export const migrate = async () => {
await db.execute(
sql.raw(`
create extension if not exists pg_trgm;
SET pg_trgm.word_similarity_threshold = 0.4;
ALTER DATABASE "${dbConfig.database}" SET pg_trgm.word_similarity_threshold = 0.4;
`),
);
@@ -28,4 +29,5 @@ export const migrate = async () => {
migrationsSchema: "kyoo",
migrationsFolder: "./drizzle",
});
console.log(`Database ${dbConfig.database} migrated!`);
};