@vrplatform/kysely 1.3.45-stage.38406427342 → 1.3.45-stage.38525456232

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,30 @@
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 = '10min'`.execute(db);
7
+ // Each address delete probes these referencing columns, including global users.
8
+ await sql`
9
+ create index if not exists user_address_id_idx on public."user" (address_id)
10
+ where address_id is not null
11
+ `.execute(db);
12
+ await sql`
13
+ create index if not exists owner_address_id_idx on public.owner (address_id)
14
+ where address_id is not null
15
+ `.execute(db);
16
+ await sql`
17
+ create index if not exists tenant_billing_address_id_idx on public.tenant (billing_address_id)
18
+ where billing_address_id is not null
19
+ `.execute(db);
20
+ }
21
+
22
+ export async function down(db: Kysely<unknown>): Promise<void> {
23
+ await sql`set local lock_timeout = '5s'`.execute(db);
24
+ await sql`set local statement_timeout = '60s'`.execute(db);
25
+ await sql`drop index if exists public.tenant_billing_address_id_idx`.execute(
26
+ db
27
+ );
28
+ await sql`drop index if exists public.owner_address_id_idx`.execute(db);
29
+ await sql`drop index if exists public.user_address_id_idx`.execute(db);
30
+ }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.3.45-stage.38406427342",
6
+ "version": "1.3.45-stage.38525456232",
7
7
  "description": "",
8
8
  "main": "build/main/index.js",
9
9
  "module": "build/module/index.js",