@vrplatform/kysely 1.3.45-stage.208 → 1.3.45-stage.221
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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Kysely } from 'kysely';
|
|
2
|
+
import { sql } from 'kysely';
|
|
3
|
+
|
|
4
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
5
|
+
await sql`set local lock_timeout = '5s'`.execute(db);
|
|
6
|
+
await sql`set local statement_timeout = '60s'`.execute(db);
|
|
7
|
+
await sql`
|
|
8
|
+
alter table core.change set (
|
|
9
|
+
autovacuum_vacuum_scale_factor = 0.001,
|
|
10
|
+
autovacuum_analyze_scale_factor = 0.001
|
|
11
|
+
)
|
|
12
|
+
`.execute(db);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
16
|
+
await sql`set local lock_timeout = '5s'`.execute(db);
|
|
17
|
+
await sql`set local statement_timeout = '60s'`.execute(db);
|
|
18
|
+
await sql`
|
|
19
|
+
alter table core.change reset (
|
|
20
|
+
autovacuum_vacuum_scale_factor,
|
|
21
|
+
autovacuum_analyze_scale_factor
|
|
22
|
+
)
|
|
23
|
+
`.execute(db);
|
|
24
|
+
}
|