@vrplatform/kysely 1.3.45-6343 → 1.3.45-6355

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`
7
+ alter table public.tenant
8
+ alter column partner_denied_permissions
9
+ set default array['ach-payments:execute']::text[]
10
+ `.execute(db);
11
+ await sql`alter table public.tenant disable trigger user`.execute(db);
12
+ await sql`
13
+ update public.tenant
14
+ set partner_denied_permissions = array_append(
15
+ partner_denied_permissions,
16
+ 'ach-payments:execute'
17
+ )
18
+ where not ('ach-payments:execute' = any(partner_denied_permissions))
19
+ `.execute(db);
20
+ await sql`alter table public.tenant enable trigger user`.execute(db);
21
+ }
22
+
23
+ export async function down(db: Kysely<unknown>): Promise<void> {
24
+ // Preserve stored denials because migrated defaults and explicit choices
25
+ // are indistinguishable after the up migration.
26
+ await sql`
27
+ alter table public.tenant
28
+ alter column partner_denied_permissions set default '{}'
29
+ `.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-6343",
6
+ "version": "1.3.45-6355",
7
7
  "description": "",
8
8
  "main": "build/main/index.js",
9
9
  "module": "build/module/index.js",