mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix pg_trgm word similarly threshold even for the first session
This commit is contained in:
parent
1bca9f47dd
commit
9b526461c6
7
.github/workflows/api-test.yml
vendored
7
.github/workflows/api-test.yml
vendored
@ -38,10 +38,3 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
JWT_SECRET: "TODO"
|
JWT_SECRET: "TODO"
|
||||||
POSTGRES_SERVER: localhost
|
POSTGRES_SERVER: localhost
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: results
|
|
||||||
path: auth/out
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
"dev": "bun --watch src/index.ts",
|
"dev": "bun --watch src/index.ts",
|
||||||
"build": "bun build src/index.ts --target bun --outdir ./dist",
|
"build": "bun build src/index.ts --target bun --outdir ./dist",
|
||||||
"start": "NODE_ENV=production bun dist/index.js",
|
"start": "NODE_ENV=production bun dist/index.js",
|
||||||
"test": "bun test"
|
"test": "bun test",
|
||||||
|
"format": "biome check --write ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@elysiajs/jwt": "^1.2.0",
|
"@elysiajs/jwt": "^1.2.0",
|
||||||
|
@ -21,6 +21,7 @@ export const migrate = async () => {
|
|||||||
await db.execute(
|
await db.execute(
|
||||||
sql.raw(`
|
sql.raw(`
|
||||||
create extension if not exists pg_trgm;
|
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;
|
ALTER DATABASE "${dbConfig.database}" SET pg_trgm.word_similarity_threshold = 0.4;
|
||||||
`),
|
`),
|
||||||
);
|
);
|
||||||
@ -28,4 +29,5 @@ export const migrate = async () => {
|
|||||||
migrationsSchema: "kyoo",
|
migrationsSchema: "kyoo",
|
||||||
migrationsFolder: "./drizzle",
|
migrationsFolder: "./drizzle",
|
||||||
});
|
});
|
||||||
|
console.log(`Database ${dbConfig.database} migrated!`);
|
||||||
};
|
};
|
||||||
|
@ -309,6 +309,7 @@ describe("search", () => {
|
|||||||
const [resp, body] = await getMovies({
|
const [resp, body] = await getMovies({
|
||||||
limit: 2,
|
limit: 2,
|
||||||
query: "bobble",
|
query: "bobble",
|
||||||
|
langs: "en",
|
||||||
});
|
});
|
||||||
|
|
||||||
expectStatus(resp, body).toBe(200);
|
expectStatus(resp, body).toBe(200);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user