@vrplatform/kysely 1.3.45-5981 → 1.3.45-6004
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,25 @@
|
|
|
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
|
+
|
|
8
|
+
await sql`
|
|
9
|
+
create index if not exists
|
|
10
|
+
journal_entry_transaction_reservation_tenant_idx
|
|
11
|
+
on accounting.journal_entry (
|
|
12
|
+
transaction_id,
|
|
13
|
+
reservation_id,
|
|
14
|
+
tenant_id
|
|
15
|
+
)
|
|
16
|
+
where transaction_id is not null
|
|
17
|
+
`.execute(db);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
21
|
+
await sql`
|
|
22
|
+
drop index if exists
|
|
23
|
+
accounting.journal_entry_transaction_reservation_tenant_idx
|
|
24
|
+
`.execute(db);
|
|
25
|
+
}
|