@vrplatform/kysely 1.3.45-14 → 1.3.45-157

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,44 @@
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`
6
+ alter table public.connection
7
+ drop constraint connection_tenant_id_fkey,
8
+ add constraint connection_tenant_id_fkey
9
+ foreign key (tenant_id)
10
+ references public.tenant(id)
11
+ on update restrict
12
+ on delete cascade
13
+ `.execute(db);
14
+ await sql`
15
+ alter table accounting.account_reservation_line_type
16
+ drop constraint account_reservation_line_type_account_id_fkey,
17
+ add constraint account_reservation_line_type_account_id_fkey
18
+ foreign key (account_id)
19
+ references accounting.account(id)
20
+ on update restrict
21
+ on delete cascade
22
+ `.execute(db);
23
+ }
24
+
25
+ export async function down(db: Kysely<unknown>): Promise<void> {
26
+ await sql`
27
+ alter table accounting.account_reservation_line_type
28
+ drop constraint account_reservation_line_type_account_id_fkey,
29
+ add constraint account_reservation_line_type_account_id_fkey
30
+ foreign key (account_id)
31
+ references accounting.account(id)
32
+ on update restrict
33
+ on delete restrict
34
+ `.execute(db);
35
+ await sql`
36
+ alter table public.connection
37
+ drop constraint connection_tenant_id_fkey,
38
+ add constraint connection_tenant_id_fkey
39
+ foreign key (tenant_id)
40
+ references public.tenant(id)
41
+ on update restrict
42
+ on delete restrict
43
+ `.execute(db);
44
+ }
@@ -0,0 +1,19 @@
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`
6
+ create index if not exists reservation_issue_seed_bucket_idx
7
+ on public.reservation (
8
+ (get_byte(uuid_send(id), 15) % 60),
9
+ id
10
+ )
11
+ include (tenant_id)
12
+ `.execute(db);
13
+ }
14
+
15
+ export async function down(db: Kysely<unknown>): Promise<void> {
16
+ await sql`
17
+ drop index if exists public.reservation_issue_seed_bucket_idx
18
+ `.execute(db);
19
+ }
@@ -0,0 +1,29 @@
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`
6
+ drop index if exists public.payment_line_recent_classification_idx
7
+ `.execute(db);
8
+ await sql`
9
+ drop index if exists
10
+ accounting.transaction_line_recent_classification_idx
11
+ `.execute(db);
12
+ }
13
+
14
+ export async function down(db: Kysely<unknown>): Promise<void> {
15
+ await sql`
16
+ create index if not exists payment_line_recent_classification_idx
17
+ on public.payment_line (updated_at, type2)
18
+ include (payment_id, reservation_id)
19
+ where type2 is not null and type2 != 'deviation'
20
+ `.execute(db);
21
+ await sql`
22
+ create index if not exists transaction_line_recent_classification_idx
23
+ on accounting.transaction_line (
24
+ updated_at,
25
+ match_line_type_classification
26
+ )
27
+ where match_line_type_classification is not null
28
+ `.execute(db);
29
+ }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.3.45-14",
6
+ "version": "1.3.45-157",
7
7
  "description": "",
8
8
  "main": "build/main/index.js",
9
9
  "module": "build/module/index.js",