@authhero/kysely-adapter 10.117.0 → 10.119.0
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.
- package/dist/kysely-adapter.cjs +12 -12
- package/dist/kysely-adapter.d.ts +1 -0
- package/dist/kysely-adapter.mjs +939 -915
- package/package.json +2 -2
package/dist/kysely-adapter.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { nanoid as k, customAlphabet as $e } from "nanoid";
|
|
|
5
5
|
import { parseUserId as Ee, flowSchema as U, codeSchema as Ie, loginSessionSchema as ze, LoginSessionState as ie, promptSettingSchema as Pe, formSchema as q, resourceServerSchema as De } from "@authhero/adapter-interfaces";
|
|
6
6
|
import "@hono/zod-openapi";
|
|
7
7
|
import { sql as h, Migrator as ce } from "kysely";
|
|
8
|
-
var
|
|
8
|
+
var R = class extends Error {
|
|
9
9
|
/**
|
|
10
10
|
* Creates an instance of `HTTPException`.
|
|
11
11
|
* @param status - HTTP status code for the exception. Defaults to 500.
|
|
@@ -64,7 +64,7 @@ function Ae(e) {
|
|
|
64
64
|
};
|
|
65
65
|
e.isTransaction ? await d(e) : await e.transaction().execute(d);
|
|
66
66
|
} catch (d) {
|
|
67
|
-
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.message.includes("AlreadyExists") ? new
|
|
67
|
+
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.message.includes("AlreadyExists") ? new R(409, { message: "User already exists" }) : new R(500, { message: `${d.code}, ${d.message}` });
|
|
68
68
|
}
|
|
69
69
|
return {
|
|
70
70
|
...i,
|
|
@@ -279,11 +279,11 @@ function Me(e) {
|
|
|
279
279
|
)
|
|
280
280
|
).execute(), await e.deleteFrom("users").where("users.tenant_id", "=", t).where("users.linked_to", "=", a).execute(), (await e.deleteFrom("users").where("users.tenant_id", "=", t).where("users.user_id", "=", a).execute()).length === 1);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function M(e, t = "", a = {}) {
|
|
283
283
|
for (let n in e)
|
|
284
284
|
if (Object.prototype.hasOwnProperty.call(e, n)) {
|
|
285
285
|
const o = t ? `${t}_${n}` : n, r = e[n];
|
|
286
|
-
typeof r == "object" && r !== null && !Array.isArray(r) ?
|
|
286
|
+
typeof r == "object" && r !== null && !Array.isArray(r) ? M(r, o, a) : typeof r == "boolean" ? a[o] = r ? 1 : 0 : a[o] = r;
|
|
287
287
|
}
|
|
288
288
|
return a;
|
|
289
289
|
}
|
|
@@ -307,7 +307,7 @@ function le(e, t) {
|
|
|
307
307
|
}
|
|
308
308
|
function Je(e) {
|
|
309
309
|
return async (t, a, n) => {
|
|
310
|
-
const o =
|
|
310
|
+
const o = M({
|
|
311
311
|
...n,
|
|
312
312
|
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
313
313
|
app_metadata: n.app_metadata ? JSON.stringify(n.app_metadata) : void 0,
|
|
@@ -498,7 +498,7 @@ function Ge(e) {
|
|
|
498
498
|
try {
|
|
499
499
|
await e.insertInto("tenants").values(n).execute();
|
|
500
500
|
} catch (s) {
|
|
501
|
-
throw (o = s == null ? void 0 : s.message) != null && o.includes("UNIQUE constraint failed") || (r = s == null ? void 0 : s.message) != null && r.includes("duplicate key") || (s == null ? void 0 : s.code) === "SQLITE_CONSTRAINT" || (s == null ? void 0 : s.code) === "23505" ? new
|
|
501
|
+
throw (o = s == null ? void 0 : s.message) != null && o.includes("UNIQUE constraint failed") || (r = s == null ? void 0 : s.message) != null && r.includes("duplicate key") || (s == null ? void 0 : s.code) === "SQLITE_CONSTRAINT" || (s == null ? void 0 : s.code) === "23505" ? new R(409, {
|
|
502
502
|
message: `Tenant with ID '${a.id}' already exists`
|
|
503
503
|
}) : s;
|
|
504
504
|
}
|
|
@@ -677,7 +677,7 @@ function pe(e) {
|
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function D(e, t = (/* @__PURE__ */ new Date(0)).toISOString()) {
|
|
681
681
|
return pe(e) ?? t;
|
|
682
682
|
}
|
|
683
683
|
function v(e) {
|
|
@@ -689,11 +689,11 @@ function v(e) {
|
|
|
689
689
|
function W() {
|
|
690
690
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function A(e, t, a = []) {
|
|
693
693
|
const n = {};
|
|
694
694
|
for (const o of t) {
|
|
695
695
|
const r = o.replace(/_ts$/, "");
|
|
696
|
-
n[r] =
|
|
696
|
+
n[r] = D(e[o]);
|
|
697
697
|
}
|
|
698
698
|
for (const o of a) {
|
|
699
699
|
const r = o.replace(/_ts$/, "");
|
|
@@ -719,7 +719,7 @@ function it(e) {
|
|
|
719
719
|
used_at_ts: _,
|
|
720
720
|
revoked_at_ts: p,
|
|
721
721
|
...f
|
|
722
|
-
} = n, g =
|
|
722
|
+
} = n, g = A(
|
|
723
723
|
{
|
|
724
724
|
created_at_ts: i,
|
|
725
725
|
updated_at_ts: d,
|
|
@@ -819,7 +819,7 @@ function ut(e) {
|
|
|
819
819
|
used_at_ts: X,
|
|
820
820
|
revoked_at_ts: Ne,
|
|
821
821
|
...be
|
|
822
|
-
} = p, Se =
|
|
822
|
+
} = p, Se = A(
|
|
823
823
|
{
|
|
824
824
|
created_at_ts: b,
|
|
825
825
|
updated_at_ts: C,
|
|
@@ -1856,7 +1856,7 @@ function xa(e) {
|
|
|
1856
1856
|
created_at_ts: g,
|
|
1857
1857
|
updated_at_ts: y,
|
|
1858
1858
|
...b
|
|
1859
|
-
} = m, C =
|
|
1859
|
+
} = m, C = A({ created_at_ts: g, updated_at_ts: y }, [
|
|
1860
1860
|
"created_at_ts",
|
|
1861
1861
|
"updated_at_ts"
|
|
1862
1862
|
]);
|
|
@@ -1893,7 +1893,7 @@ function Ta(e) {
|
|
|
1893
1893
|
created_at_ts: r,
|
|
1894
1894
|
updated_at_ts: s,
|
|
1895
1895
|
...i
|
|
1896
|
-
} = n, d =
|
|
1896
|
+
} = n, d = A({ created_at_ts: r, updated_at_ts: s }, [
|
|
1897
1897
|
"created_at_ts",
|
|
1898
1898
|
"updated_at_ts"
|
|
1899
1899
|
]);
|
|
@@ -1960,7 +1960,7 @@ function ka(e) {
|
|
|
1960
1960
|
...o,
|
|
1961
1961
|
tenant_id: t
|
|
1962
1962
|
};
|
|
1963
|
-
return await e.insertInto("themes").values(
|
|
1963
|
+
return await e.insertInto("themes").values(M(r)).execute(), o;
|
|
1964
1964
|
};
|
|
1965
1965
|
}
|
|
1966
1966
|
function $a(e) {
|
|
@@ -1994,7 +1994,7 @@ function Ea(e) {
|
|
|
1994
1994
|
}
|
|
1995
1995
|
function Ia(e) {
|
|
1996
1996
|
return async (t, a, n) => {
|
|
1997
|
-
const { themeId: o, ...r } = n, s =
|
|
1997
|
+
const { themeId: o, ...r } = n, s = M({
|
|
1998
1998
|
...r,
|
|
1999
1999
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2000
2000
|
});
|
|
@@ -2013,7 +2013,7 @@ function Pa(e) {
|
|
|
2013
2013
|
return async (t, a) => {
|
|
2014
2014
|
const n = await e.selectFrom("login_sessions").where("login_sessions.id", "=", a).selectAll().executeTakeFirst();
|
|
2015
2015
|
if (!n) return null;
|
|
2016
|
-
const { created_at_ts: o, updated_at_ts: r, expires_at_ts: s, ...i } = n, d =
|
|
2016
|
+
const { created_at_ts: o, updated_at_ts: r, expires_at_ts: s, ...i } = n, d = A(
|
|
2017
2017
|
{ created_at_ts: o, updated_at_ts: r, expires_at_ts: s },
|
|
2018
2018
|
["created_at_ts", "updated_at_ts", "expires_at_ts"]
|
|
2019
2019
|
);
|
|
@@ -2061,7 +2061,7 @@ function Fa(e) {
|
|
|
2061
2061
|
state: a.state || ie.PENDING,
|
|
2062
2062
|
state_data: a.state_data,
|
|
2063
2063
|
failure_reason: a.failure_reason
|
|
2064
|
-
}, r = Date.now(), s =
|
|
2064
|
+
}, r = Date.now(), s = M(o);
|
|
2065
2065
|
return delete s.created_at, delete s.updated_at, delete s.expires_at, await e.insertInto("login_sessions").values({
|
|
2066
2066
|
...s,
|
|
2067
2067
|
tenant_id: t,
|
|
@@ -2074,7 +2074,7 @@ function Fa(e) {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
function Ra(e) {
|
|
2076
2076
|
return async (t, a, n) => {
|
|
2077
|
-
const { created_at: o, updated_at: r, expires_at: s, ...i } = n, d =
|
|
2077
|
+
const { created_at: o, updated_at: r, expires_at: s, ...i } = n, d = M(i);
|
|
2078
2078
|
return delete d.created_at_ts, delete d.updated_at_ts, delete d.expires_at_ts, delete d.id, delete d.tenant_id, (await e.updateTable("login_sessions").set({
|
|
2079
2079
|
...d,
|
|
2080
2080
|
updated_at_ts: Date.now(),
|
|
@@ -2204,7 +2204,7 @@ function Wa(e) {
|
|
|
2204
2204
|
idle_expires_at_ts: i,
|
|
2205
2205
|
last_exchanged_at_ts: d,
|
|
2206
2206
|
...u
|
|
2207
|
-
} = n, c =
|
|
2207
|
+
} = n, c = A(
|
|
2208
2208
|
{
|
|
2209
2209
|
created_at_ts: r,
|
|
2210
2210
|
expires_at_ts: s,
|
|
@@ -2297,7 +2297,7 @@ function Za(e) {
|
|
|
2297
2297
|
idle_expires_at_ts: b,
|
|
2298
2298
|
last_exchanged_at_ts: C,
|
|
2299
2299
|
...$
|
|
2300
|
-
} = p, I =
|
|
2300
|
+
} = p, I = A(
|
|
2301
2301
|
{
|
|
2302
2302
|
created_at_ts: g,
|
|
2303
2303
|
expires_at_ts: y,
|
|
@@ -2997,7 +2997,7 @@ function jn(e) {
|
|
|
2997
2997
|
try {
|
|
2998
2998
|
await e.insertInto("organizations").values(n).execute();
|
|
2999
2999
|
} catch (o) {
|
|
3000
|
-
throw o.code === "SQLITE_CONSTRAINT_UNIQUE" || o.message.includes("AlreadyExists") ? new
|
|
3000
|
+
throw o.code === "SQLITE_CONSTRAINT_UNIQUE" || o.message.includes("AlreadyExists") ? new R(409, {
|
|
3001
3001
|
message: "Organization already exists"
|
|
3002
3002
|
}) : o;
|
|
3003
3003
|
}
|
|
@@ -3112,7 +3112,7 @@ function Kn(e) {
|
|
|
3112
3112
|
try {
|
|
3113
3113
|
await e.insertInto("user_organizations").values(n).execute();
|
|
3114
3114
|
} catch (o) {
|
|
3115
|
-
throw o.code === "SQLITE_CONSTRAINT_UNIQUE" || o.code === "ER_DUP_ENTRY" ? new
|
|
3115
|
+
throw o.code === "SQLITE_CONSTRAINT_UNIQUE" || o.code === "ER_DUP_ENTRY" ? new R(409, {
|
|
3116
3116
|
message: "User is already a member of this organization"
|
|
3117
3117
|
}) : o;
|
|
3118
3118
|
}
|
|
@@ -3265,7 +3265,7 @@ function Wn(e) {
|
|
|
3265
3265
|
try {
|
|
3266
3266
|
await e.insertInto("invites").values(i).execute();
|
|
3267
3267
|
} catch (d) {
|
|
3268
|
-
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.message.includes("AlreadyExists") ? new
|
|
3268
|
+
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.message.includes("AlreadyExists") ? new R(409, {
|
|
3269
3269
|
message: "Invite already exists"
|
|
3270
3270
|
}) : d;
|
|
3271
3271
|
}
|
|
@@ -3500,12 +3500,33 @@ function ge(e) {
|
|
|
3500
3500
|
transports: n.transports ? JSON.parse(n.transports) : void 0,
|
|
3501
3501
|
friendly_name: n.friendly_name ?? void 0,
|
|
3502
3502
|
confirmed: n.confirmed === 1,
|
|
3503
|
-
created_at:
|
|
3504
|
-
updated_at:
|
|
3503
|
+
created_at: D(n.created_at_ts),
|
|
3504
|
+
updated_at: D(n.updated_at_ts)
|
|
3505
3505
|
} : null;
|
|
3506
3506
|
};
|
|
3507
3507
|
}
|
|
3508
3508
|
function ro(e) {
|
|
3509
|
+
return async (t, a) => {
|
|
3510
|
+
const n = await e.selectFrom("authentication_methods").where("authentication_methods.tenant_id", "=", t).where("authentication_methods.credential_id", "=", a).selectAll().executeTakeFirst();
|
|
3511
|
+
return n ? {
|
|
3512
|
+
id: n.id,
|
|
3513
|
+
user_id: n.user_id,
|
|
3514
|
+
type: n.type,
|
|
3515
|
+
phone_number: n.phone_number ?? void 0,
|
|
3516
|
+
totp_secret: n.totp_secret ?? void 0,
|
|
3517
|
+
credential_id: n.credential_id ?? void 0,
|
|
3518
|
+
public_key: n.public_key ?? void 0,
|
|
3519
|
+
sign_count: n.sign_count ?? void 0,
|
|
3520
|
+
credential_backed_up: n.credential_backed_up != null ? n.credential_backed_up === 1 : void 0,
|
|
3521
|
+
transports: n.transports ? JSON.parse(n.transports) : void 0,
|
|
3522
|
+
friendly_name: n.friendly_name ?? void 0,
|
|
3523
|
+
confirmed: n.confirmed === 1,
|
|
3524
|
+
created_at: D(n.created_at_ts),
|
|
3525
|
+
updated_at: D(n.updated_at_ts)
|
|
3526
|
+
} : null;
|
|
3527
|
+
};
|
|
3528
|
+
}
|
|
3529
|
+
function so(e) {
|
|
3509
3530
|
return async (t, a) => (await e.selectFrom("authentication_methods").where("authentication_methods.tenant_id", "=", t).where("authentication_methods.user_id", "=", a).selectAll().execute()).map((o) => ({
|
|
3510
3531
|
id: o.id,
|
|
3511
3532
|
user_id: o.user_id,
|
|
@@ -3519,11 +3540,11 @@ function ro(e) {
|
|
|
3519
3540
|
transports: o.transports ? JSON.parse(o.transports) : void 0,
|
|
3520
3541
|
friendly_name: o.friendly_name ?? void 0,
|
|
3521
3542
|
confirmed: o.confirmed === 1,
|
|
3522
|
-
created_at:
|
|
3523
|
-
updated_at:
|
|
3543
|
+
created_at: D(o.created_at_ts),
|
|
3544
|
+
updated_at: D(o.updated_at_ts)
|
|
3524
3545
|
}));
|
|
3525
3546
|
}
|
|
3526
|
-
function
|
|
3547
|
+
function io(e) {
|
|
3527
3548
|
return async (t, a, n) => {
|
|
3528
3549
|
const r = {
|
|
3529
3550
|
updated_at_ts: Date.now()
|
|
@@ -3535,19 +3556,20 @@ function so(e) {
|
|
|
3535
3556
|
return s;
|
|
3536
3557
|
};
|
|
3537
3558
|
}
|
|
3538
|
-
function
|
|
3559
|
+
function co(e) {
|
|
3539
3560
|
return async (t, a) => (await e.deleteFrom("authentication_methods").where("authentication_methods.tenant_id", "=", t).where("authentication_methods.id", "=", a).executeTakeFirst()).numDeletedRows > 0;
|
|
3540
3561
|
}
|
|
3541
|
-
function
|
|
3562
|
+
function lo(e) {
|
|
3542
3563
|
return {
|
|
3543
3564
|
create: oo(e),
|
|
3544
3565
|
get: ge(e),
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3566
|
+
getByCredentialId: ro(e),
|
|
3567
|
+
list: so(e),
|
|
3568
|
+
update: io(e),
|
|
3569
|
+
remove: co(e)
|
|
3548
3570
|
};
|
|
3549
3571
|
}
|
|
3550
|
-
function
|
|
3572
|
+
function uo(e) {
|
|
3551
3573
|
return async (t, a) => {
|
|
3552
3574
|
const n = k();
|
|
3553
3575
|
return await e.insertInto("outbox_events").values({
|
|
@@ -3566,7 +3588,7 @@ function lo(e) {
|
|
|
3566
3588
|
}).execute(), n;
|
|
3567
3589
|
};
|
|
3568
3590
|
}
|
|
3569
|
-
function
|
|
3591
|
+
function _o(e) {
|
|
3570
3592
|
return async (t) => t.length === 0 ? [] : (await e.selectFrom("outbox_events").selectAll().where("id", "in", t).execute()).map((n) => ({
|
|
3571
3593
|
...JSON.parse(n.payload),
|
|
3572
3594
|
id: n.id,
|
|
@@ -3577,7 +3599,7 @@ function uo(e) {
|
|
|
3577
3599
|
error: n.error
|
|
3578
3600
|
}));
|
|
3579
3601
|
}
|
|
3580
|
-
function
|
|
3602
|
+
function mo(e) {
|
|
3581
3603
|
return async (t) => {
|
|
3582
3604
|
const a = (/* @__PURE__ */ new Date()).toISOString();
|
|
3583
3605
|
return (await e.selectFrom("outbox_events").selectAll().where("processed_at", "is", null).where(
|
|
@@ -3601,7 +3623,7 @@ function _o(e) {
|
|
|
3601
3623
|
}));
|
|
3602
3624
|
};
|
|
3603
3625
|
}
|
|
3604
|
-
function
|
|
3626
|
+
function ho(e) {
|
|
3605
3627
|
return async (t, a, n) => {
|
|
3606
3628
|
if (t.length === 0) return [];
|
|
3607
3629
|
const o = (/* @__PURE__ */ new Date()).toISOString(), r = new Date(Date.now() + n).toISOString();
|
|
@@ -3616,37 +3638,39 @@ function mo(e) {
|
|
|
3616
3638
|
).execute(), (await e.selectFrom("outbox_events").select("id").where("id", "in", t).where("claimed_by", "=", a).where("claim_expires_at", "=", r).execute()).map((i) => i.id);
|
|
3617
3639
|
};
|
|
3618
3640
|
}
|
|
3619
|
-
function
|
|
3641
|
+
function po(e) {
|
|
3620
3642
|
return async (t) => {
|
|
3621
3643
|
if (t.length === 0) return;
|
|
3622
3644
|
const a = (/* @__PURE__ */ new Date()).toISOString();
|
|
3623
3645
|
await e.updateTable("outbox_events").set({ processed_at: a }).where("id", "in", t).execute();
|
|
3624
3646
|
};
|
|
3625
3647
|
}
|
|
3626
|
-
function
|
|
3648
|
+
function fo(e) {
|
|
3627
3649
|
return async (t, a, n) => {
|
|
3628
3650
|
await e.updateTable("outbox_events").set({
|
|
3629
3651
|
error: a,
|
|
3630
3652
|
next_retry_at: n,
|
|
3631
|
-
retry_count: h`retry_count + 1
|
|
3653
|
+
retry_count: h`retry_count + 1`,
|
|
3654
|
+
claimed_by: null,
|
|
3655
|
+
claim_expires_at: null
|
|
3632
3656
|
}).where("id", "=", t).execute();
|
|
3633
3657
|
};
|
|
3634
3658
|
}
|
|
3635
|
-
function
|
|
3659
|
+
function go(e) {
|
|
3636
3660
|
return async (t) => {
|
|
3637
3661
|
const a = await e.deleteFrom("outbox_events").where("processed_at", "is not", null).where("processed_at", "<", t).executeTakeFirst();
|
|
3638
3662
|
return Number(a.numDeletedRows);
|
|
3639
3663
|
};
|
|
3640
3664
|
}
|
|
3641
|
-
function
|
|
3665
|
+
function wo(e) {
|
|
3642
3666
|
return {
|
|
3643
|
-
create:
|
|
3644
|
-
getByIds:
|
|
3645
|
-
getUnprocessed:
|
|
3646
|
-
claimEvents:
|
|
3647
|
-
markProcessed:
|
|
3648
|
-
markRetry:
|
|
3649
|
-
cleanup:
|
|
3667
|
+
create: uo(e),
|
|
3668
|
+
getByIds: _o(e),
|
|
3669
|
+
getUnprocessed: mo(e),
|
|
3670
|
+
claimEvents: ho(e),
|
|
3671
|
+
markProcessed: po(e),
|
|
3672
|
+
markRetry: fo(e),
|
|
3673
|
+
cleanup: go(e)
|
|
3650
3674
|
};
|
|
3651
3675
|
}
|
|
3652
3676
|
class we {
|
|
@@ -3658,7 +3682,7 @@ class we {
|
|
|
3658
3682
|
return this.migrations;
|
|
3659
3683
|
}
|
|
3660
3684
|
}
|
|
3661
|
-
async function
|
|
3685
|
+
async function yo(e) {
|
|
3662
3686
|
await e.schema.createTable("tenants").addColumn("id", "varchar(255)", (t) => t.primaryKey()).addColumn("name", "varchar(255)").addColumn("audience", "varchar(255)").addColumn("sender_email", "varchar(255)").addColumn("sender_name", "varchar(255)").addColumn("language", "varchar(255)").addColumn("logo", "varchar(255)").addColumn("primary_color", "varchar(255)").addColumn("secondary_color", "varchar(255)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute(), await e.schema.createTable("users").addColumn("user_id", "varchar(255)", (t) => t.notNull()).addColumn(
|
|
3663
3687
|
"tenant_id",
|
|
3664
3688
|
"varchar(255)",
|
|
@@ -3730,35 +3754,35 @@ async function wo(e) {
|
|
|
3730
3754
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
3731
3755
|
).addColumn("domain", "varchar(255)", (t) => t.notNull()).addColumn("email_service", "varchar(255)").addColumn("email_api_key", "varchar(255)").addColumn("dkim_private_key", "varchar(2048)").addColumn("dkim_public_key", "varchar(2048)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute();
|
|
3732
3756
|
}
|
|
3733
|
-
async function
|
|
3757
|
+
async function vo(e) {
|
|
3734
3758
|
await e.schema.dropTable("domains").execute(), await e.schema.dropTable("members").execute(), await e.schema.dropTable("users").execute(), await e.schema.dropTable("connections").execute(), await e.schema.dropTable("applications").execute(), await e.schema.dropTable("migrations").execute(), await e.schema.dropTable("tenants").execute();
|
|
3735
3759
|
}
|
|
3736
|
-
const
|
|
3760
|
+
const Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3737
3761
|
__proto__: null,
|
|
3738
|
-
down:
|
|
3739
|
-
up:
|
|
3762
|
+
down: vo,
|
|
3763
|
+
up: yo
|
|
3740
3764
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3741
|
-
async function
|
|
3765
|
+
async function xo(e) {
|
|
3742
3766
|
await e.schema.alterTable("tenants").addColumn("support_url", "varchar(255)").execute();
|
|
3743
3767
|
}
|
|
3744
|
-
async function
|
|
3768
|
+
async function To(e) {
|
|
3745
3769
|
await e.schema.alterTable("tenants").dropColumn("support_url").execute();
|
|
3746
3770
|
}
|
|
3747
|
-
const
|
|
3771
|
+
const No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3748
3772
|
__proto__: null,
|
|
3749
|
-
down:
|
|
3750
|
-
up:
|
|
3773
|
+
down: To,
|
|
3774
|
+
up: xo
|
|
3751
3775
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3752
|
-
async function No(e) {
|
|
3753
|
-
}
|
|
3754
3776
|
async function bo(e) {
|
|
3755
3777
|
}
|
|
3756
|
-
|
|
3778
|
+
async function So(e) {
|
|
3779
|
+
}
|
|
3780
|
+
const Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3757
3781
|
__proto__: null,
|
|
3758
|
-
down:
|
|
3759
|
-
up:
|
|
3782
|
+
down: So,
|
|
3783
|
+
up: bo
|
|
3760
3784
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3761
|
-
async function
|
|
3785
|
+
async function ko(e) {
|
|
3762
3786
|
await e.schema.createTable("logs").addColumn("id", "varchar(255)", (t) => t.notNull().primaryKey()).addColumn("category", "varchar(255)", (t) => t.notNull()).addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addForeignKeyConstraint(
|
|
3763
3787
|
"tenant_id_constraint",
|
|
3764
3788
|
["tenant_id"],
|
|
@@ -3767,24 +3791,24 @@ async function Oo(e) {
|
|
|
3767
3791
|
(t) => t.onDelete("cascade")
|
|
3768
3792
|
).addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (t) => t.notNull()).addColumn("date", "varchar(25)", (t) => t.notNull()).addColumn("client_id", "varchar(255)").addColumn("client_name", "varchar(255)").addColumn("user_agent", "varchar(255)").addColumn("description", "varchar(255)").addColumn("details", "varchar(2048)").execute();
|
|
3769
3793
|
}
|
|
3770
|
-
async function
|
|
3794
|
+
async function $o(e) {
|
|
3771
3795
|
await e.schema.dropTable("logs").execute();
|
|
3772
3796
|
}
|
|
3773
|
-
const
|
|
3797
|
+
const Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3774
3798
|
__proto__: null,
|
|
3775
|
-
down:
|
|
3776
|
-
up:
|
|
3799
|
+
down: $o,
|
|
3800
|
+
up: ko
|
|
3777
3801
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3778
|
-
async function Eo(e) {
|
|
3779
|
-
}
|
|
3780
3802
|
async function Io(e) {
|
|
3781
3803
|
}
|
|
3782
|
-
|
|
3804
|
+
async function zo(e) {
|
|
3805
|
+
}
|
|
3806
|
+
const Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3783
3807
|
__proto__: null,
|
|
3784
|
-
down:
|
|
3785
|
-
up:
|
|
3808
|
+
down: zo,
|
|
3809
|
+
up: Io
|
|
3786
3810
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3787
|
-
async function
|
|
3811
|
+
async function Do(e) {
|
|
3788
3812
|
await e.schema.createTable("sessions").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
3789
3813
|
"user_id_constraint",
|
|
3790
3814
|
["user_id", "tenant_id"],
|
|
@@ -3809,15 +3833,15 @@ async function Po(e) {
|
|
|
3809
3833
|
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
3810
3834
|
).addColumn("code", "varchar(255)", (t) => t.notNull()).addColumn("email", "varchar(255)", (t) => t.notNull()).addColumn("user_id", "varchar(255)").addColumn("send", "varchar(255)").addColumn("nonce", "varchar(255)").addColumn("state", "varchar(1024)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute(), await e.schema.createIndex("otps_email_index").on("otps").column("email").execute(), await e.schema.createIndex("otps_expires_at_index").on("otps").column("expires_at").execute();
|
|
3811
3835
|
}
|
|
3812
|
-
async function
|
|
3836
|
+
async function Ao(e) {
|
|
3813
3837
|
await e.schema.dropTable("sessions").execute(), await e.schema.dropTable("tickets").execute(), await e.schema.dropTable("otps").execute();
|
|
3814
3838
|
}
|
|
3815
|
-
const
|
|
3839
|
+
const jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3816
3840
|
__proto__: null,
|
|
3817
|
-
down:
|
|
3818
|
-
up:
|
|
3841
|
+
down: Ao,
|
|
3842
|
+
up: Do
|
|
3819
3843
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3820
|
-
async function
|
|
3844
|
+
async function Fo(e) {
|
|
3821
3845
|
await e.schema.createTable("passwords").addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addPrimaryKeyConstraint("passwords_pkey", ["user_id", "tenant_id"]).addForeignKeyConstraint(
|
|
3822
3846
|
"user_id_constraint",
|
|
3823
3847
|
["user_id", "tenant_id"],
|
|
@@ -3832,24 +3856,24 @@ async function jo(e) {
|
|
|
3832
3856
|
(t) => t.onDelete("cascade")
|
|
3833
3857
|
).addColumn("type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute(), await e.schema.createIndex("codes_expires_at_index").on("codes").column("expires_at").execute();
|
|
3834
3858
|
}
|
|
3835
|
-
async function
|
|
3859
|
+
async function Ro(e) {
|
|
3836
3860
|
await e.schema.dropTable("passwords").execute(), await e.schema.dropTable("codes").execute();
|
|
3837
3861
|
}
|
|
3838
|
-
const
|
|
3862
|
+
const Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3839
3863
|
__proto__: null,
|
|
3840
|
-
down:
|
|
3841
|
-
up:
|
|
3864
|
+
down: Ro,
|
|
3865
|
+
up: Fo
|
|
3842
3866
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3843
|
-
async function Mo(e) {
|
|
3844
|
-
}
|
|
3845
3867
|
async function Jo(e) {
|
|
3846
3868
|
}
|
|
3847
|
-
|
|
3869
|
+
async function Lo(e) {
|
|
3870
|
+
}
|
|
3871
|
+
const Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3848
3872
|
__proto__: null,
|
|
3849
|
-
down:
|
|
3850
|
-
up:
|
|
3873
|
+
down: Lo,
|
|
3874
|
+
up: Jo
|
|
3851
3875
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3852
|
-
async function
|
|
3876
|
+
async function qo(e) {
|
|
3853
3877
|
await e.schema.alterTable("passwords").addColumn(
|
|
3854
3878
|
"password",
|
|
3855
3879
|
"varchar(255)",
|
|
@@ -3857,86 +3881,86 @@ async function Ko(e) {
|
|
|
3857
3881
|
(t) => t.notNull()
|
|
3858
3882
|
).execute();
|
|
3859
3883
|
}
|
|
3860
|
-
async function
|
|
3884
|
+
async function Bo(e) {
|
|
3861
3885
|
await e.schema.alterTable("passwords").dropColumn("password").execute();
|
|
3862
3886
|
}
|
|
3863
|
-
const
|
|
3887
|
+
const Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3864
3888
|
__proto__: null,
|
|
3865
|
-
down:
|
|
3866
|
-
up:
|
|
3889
|
+
down: Bo,
|
|
3890
|
+
up: qo
|
|
3867
3891
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3868
|
-
async function Uo(e) {
|
|
3869
|
-
}
|
|
3870
3892
|
async function Qo(e) {
|
|
3871
3893
|
}
|
|
3872
|
-
|
|
3894
|
+
async function Ho(e) {
|
|
3895
|
+
}
|
|
3896
|
+
const Yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3873
3897
|
__proto__: null,
|
|
3874
|
-
down:
|
|
3875
|
-
up:
|
|
3898
|
+
down: Ho,
|
|
3899
|
+
up: Qo
|
|
3876
3900
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3877
|
-
async function Yo(e) {
|
|
3878
|
-
}
|
|
3879
3901
|
async function Wo(e) {
|
|
3880
3902
|
}
|
|
3881
|
-
|
|
3903
|
+
async function Go(e) {
|
|
3904
|
+
}
|
|
3905
|
+
const Vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3882
3906
|
__proto__: null,
|
|
3883
|
-
down:
|
|
3884
|
-
up:
|
|
3907
|
+
down: Go,
|
|
3908
|
+
up: Wo
|
|
3885
3909
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3886
|
-
async function Vo(e) {
|
|
3887
|
-
}
|
|
3888
3910
|
async function Xo(e) {
|
|
3889
3911
|
}
|
|
3890
|
-
|
|
3912
|
+
async function Zo(e) {
|
|
3913
|
+
}
|
|
3914
|
+
const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3891
3915
|
__proto__: null,
|
|
3892
|
-
down:
|
|
3893
|
-
up:
|
|
3916
|
+
down: Zo,
|
|
3917
|
+
up: Xo
|
|
3894
3918
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3895
|
-
async function
|
|
3919
|
+
async function tr(e) {
|
|
3896
3920
|
await e.schema.createIndex("users_email_index").on("users").column("email").execute();
|
|
3897
3921
|
}
|
|
3898
|
-
async function
|
|
3922
|
+
async function ar(e) {
|
|
3899
3923
|
await e.schema.dropIndex("users_email_index").execute();
|
|
3900
3924
|
}
|
|
3901
|
-
const
|
|
3925
|
+
const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3902
3926
|
__proto__: null,
|
|
3903
|
-
down:
|
|
3904
|
-
up:
|
|
3927
|
+
down: ar,
|
|
3928
|
+
up: tr
|
|
3905
3929
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3906
|
-
async function
|
|
3930
|
+
async function or(e) {
|
|
3907
3931
|
await e.schema.alterTable("users").addColumn("profileData", "varchar(2048)").execute();
|
|
3908
3932
|
}
|
|
3909
|
-
async function
|
|
3933
|
+
async function rr(e) {
|
|
3910
3934
|
await e.schema.alterTable("users").dropColumn("profileData").execute();
|
|
3911
3935
|
}
|
|
3912
|
-
const
|
|
3936
|
+
const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3913
3937
|
__proto__: null,
|
|
3914
|
-
down:
|
|
3915
|
-
up:
|
|
3938
|
+
down: rr,
|
|
3939
|
+
up: or
|
|
3916
3940
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3917
|
-
async function
|
|
3941
|
+
async function ir(e) {
|
|
3918
3942
|
await e.schema.createIndex("users_linked_to_index").on("users").column("linked_to").execute();
|
|
3919
3943
|
}
|
|
3920
|
-
async function
|
|
3944
|
+
async function cr(e) {
|
|
3921
3945
|
await e.schema.dropIndex("users_linked_to_index");
|
|
3922
3946
|
}
|
|
3923
|
-
const
|
|
3947
|
+
const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3924
3948
|
__proto__: null,
|
|
3925
|
-
down:
|
|
3926
|
-
up:
|
|
3949
|
+
down: cr,
|
|
3950
|
+
up: ir
|
|
3927
3951
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3928
|
-
async function
|
|
3952
|
+
async function dr(e) {
|
|
3929
3953
|
await e.schema.alterTable("users").addColumn("locale", "varchar(255)").execute();
|
|
3930
3954
|
}
|
|
3931
|
-
async function
|
|
3955
|
+
async function ur(e) {
|
|
3932
3956
|
await e.schema.alterTable("users").dropColumn("locale").execute();
|
|
3933
3957
|
}
|
|
3934
|
-
const
|
|
3958
|
+
const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3935
3959
|
__proto__: null,
|
|
3936
|
-
down:
|
|
3937
|
-
up:
|
|
3960
|
+
down: ur,
|
|
3961
|
+
up: dr
|
|
3938
3962
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3939
|
-
async function
|
|
3963
|
+
async function mr(e) {
|
|
3940
3964
|
await e.schema.createTable("keys").addColumn("kid", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
3941
3965
|
"tenant_id",
|
|
3942
3966
|
"varchar(255)",
|
|
@@ -3951,202 +3975,202 @@ async function _r(e) {
|
|
|
3951
3975
|
(t) => t.references("connections.id").onDelete("cascade")
|
|
3952
3976
|
).execute();
|
|
3953
3977
|
}
|
|
3954
|
-
async function
|
|
3978
|
+
async function hr(e) {
|
|
3955
3979
|
await e.schema.dropTable("keys").execute();
|
|
3956
3980
|
}
|
|
3957
|
-
const
|
|
3981
|
+
const pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3958
3982
|
__proto__: null,
|
|
3959
|
-
down:
|
|
3960
|
-
up:
|
|
3983
|
+
down: hr,
|
|
3984
|
+
up: mr
|
|
3961
3985
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3962
|
-
async function pr(e) {
|
|
3963
|
-
}
|
|
3964
3986
|
async function fr(e) {
|
|
3965
3987
|
}
|
|
3966
|
-
|
|
3988
|
+
async function gr(e) {
|
|
3989
|
+
}
|
|
3990
|
+
const wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3967
3991
|
__proto__: null,
|
|
3968
|
-
down:
|
|
3969
|
-
up:
|
|
3992
|
+
down: gr,
|
|
3993
|
+
up: fr
|
|
3970
3994
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3971
|
-
async function wr(e) {
|
|
3972
|
-
}
|
|
3973
3995
|
async function yr(e) {
|
|
3974
3996
|
}
|
|
3975
|
-
|
|
3997
|
+
async function vr(e) {
|
|
3998
|
+
}
|
|
3999
|
+
const Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3976
4000
|
__proto__: null,
|
|
3977
|
-
down:
|
|
3978
|
-
up:
|
|
4001
|
+
down: vr,
|
|
4002
|
+
up: yr
|
|
3979
4003
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3980
|
-
async function
|
|
4004
|
+
async function xr(e) {
|
|
3981
4005
|
await e.schema.alterTable("otps").addColumn("audience", "varchar(255)").execute();
|
|
3982
4006
|
}
|
|
3983
|
-
async function
|
|
4007
|
+
async function Tr(e) {
|
|
3984
4008
|
await e.schema.alterTable("otps").dropColumn("audience").execute();
|
|
3985
4009
|
}
|
|
3986
|
-
const
|
|
4010
|
+
const Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3987
4011
|
__proto__: null,
|
|
3988
|
-
down:
|
|
3989
|
-
up:
|
|
4012
|
+
down: Tr,
|
|
4013
|
+
up: xr
|
|
3990
4014
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3991
|
-
async function Nr(e) {
|
|
3992
|
-
}
|
|
3993
4015
|
async function br(e) {
|
|
3994
4016
|
}
|
|
3995
|
-
|
|
4017
|
+
async function Sr(e) {
|
|
4018
|
+
}
|
|
4019
|
+
const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3996
4020
|
__proto__: null,
|
|
3997
|
-
down:
|
|
3998
|
-
up:
|
|
4021
|
+
down: Sr,
|
|
4022
|
+
up: br
|
|
3999
4023
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4000
|
-
async function
|
|
4024
|
+
async function kr(e) {
|
|
4001
4025
|
await e.schema.alterTable("logs").dropColumn("category").execute();
|
|
4002
4026
|
}
|
|
4003
|
-
async function
|
|
4027
|
+
async function $r(e) {
|
|
4004
4028
|
await e.schema.alterTable("logs").addColumn("category", "varchar(255)", (t) => t.notNull()).execute();
|
|
4005
4029
|
}
|
|
4006
|
-
const
|
|
4030
|
+
const Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4007
4031
|
__proto__: null,
|
|
4008
|
-
down:
|
|
4009
|
-
up:
|
|
4032
|
+
down: $r,
|
|
4033
|
+
up: kr
|
|
4010
4034
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4011
|
-
async function
|
|
4035
|
+
async function Ir(e) {
|
|
4012
4036
|
await e.schema.alterTable("users").dropColumn("tags").execute();
|
|
4013
4037
|
}
|
|
4014
|
-
async function
|
|
4038
|
+
async function zr(e) {
|
|
4015
4039
|
await e.schema.alterTable("users").addColumn("tags", "varchar(255)").execute();
|
|
4016
4040
|
}
|
|
4017
|
-
const
|
|
4041
|
+
const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4018
4042
|
__proto__: null,
|
|
4019
|
-
down:
|
|
4020
|
-
up:
|
|
4043
|
+
down: zr,
|
|
4044
|
+
up: Ir
|
|
4021
4045
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4022
|
-
async function
|
|
4046
|
+
async function Dr(e) {
|
|
4023
4047
|
await e.schema.createIndex("logs_user_id").on("logs").column("user_id").execute(), await e.schema.createIndex("logs_tenant_id").on("logs").column("tenant_id").execute(), await e.schema.createIndex("logs_date").on("logs").column("date").execute();
|
|
4024
4048
|
}
|
|
4025
|
-
async function
|
|
4049
|
+
async function Ar(e) {
|
|
4026
4050
|
await e.schema.dropIndex("logs_user_id"), await e.schema.dropIndex("logs_tenant_id"), await e.schema.dropIndex("logs_date");
|
|
4027
4051
|
}
|
|
4028
|
-
const
|
|
4052
|
+
const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4029
4053
|
__proto__: null,
|
|
4030
|
-
down:
|
|
4031
|
-
up:
|
|
4054
|
+
down: Ar,
|
|
4055
|
+
up: Dr
|
|
4032
4056
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4033
|
-
async function
|
|
4057
|
+
async function Fr(e) {
|
|
4034
4058
|
await e.schema.alterTable("logs").dropColumn("details").execute(), await e.schema.alterTable("logs").addColumn("details", "varchar(8192)").execute();
|
|
4035
4059
|
}
|
|
4036
|
-
async function
|
|
4060
|
+
async function Rr(e) {
|
|
4037
4061
|
await e.schema.alterTable("logs").dropColumn("details").execute(), await e.schema.alterTable("logs").addColumn("details", "varchar(2048)").execute();
|
|
4038
4062
|
}
|
|
4039
|
-
const
|
|
4063
|
+
const Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4040
4064
|
__proto__: null,
|
|
4041
|
-
down:
|
|
4042
|
-
up:
|
|
4065
|
+
down: Rr,
|
|
4066
|
+
up: Fr
|
|
4043
4067
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4044
|
-
async function
|
|
4068
|
+
async function Jr(e) {
|
|
4045
4069
|
await e.schema.alterTable("logs").addColumn("user_name", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("auth0_client", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("isMobile", "boolean").execute(), await e.schema.alterTable("logs").addColumn("connection", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("connection_id", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("audience", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("scope", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("strategy", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("strategy_type", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("hostname", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("session_connection", "varchar(255)").execute();
|
|
4046
4070
|
}
|
|
4047
|
-
async function
|
|
4071
|
+
async function Lr(e) {
|
|
4048
4072
|
await e.schema.alterTable("logs").dropColumn("user_name").execute(), await e.schema.alterTable("logs").dropColumn("auth0_client").execute(), await e.schema.alterTable("logs").dropColumn("isMobile").execute(), await e.schema.alterTable("logs").dropColumn("connection").execute(), await e.schema.alterTable("logs").dropColumn("connection_id").execute(), await e.schema.alterTable("logs").dropColumn("audience").execute(), await e.schema.alterTable("logs").dropColumn("scope").execute(), await e.schema.alterTable("logs").dropColumn("strategy").execute(), await e.schema.alterTable("logs").dropColumn("strategy_type").execute(), await e.schema.alterTable("logs").dropColumn("hostname").execute(), await e.schema.alterTable("logs").dropColumn("session_connection").execute();
|
|
4049
4073
|
}
|
|
4050
|
-
const
|
|
4074
|
+
const Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4051
4075
|
__proto__: null,
|
|
4052
|
-
down:
|
|
4053
|
-
up:
|
|
4076
|
+
down: Lr,
|
|
4077
|
+
up: Jr
|
|
4054
4078
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4055
|
-
async function
|
|
4079
|
+
async function qr(e) {
|
|
4056
4080
|
await e.schema.createIndex("users_name_index").on("users").column("name").execute();
|
|
4057
4081
|
}
|
|
4058
|
-
async function
|
|
4082
|
+
async function Br(e) {
|
|
4059
4083
|
await e.schema.dropIndex("users_name_index").execute();
|
|
4060
4084
|
}
|
|
4061
|
-
const
|
|
4085
|
+
const Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4062
4086
|
__proto__: null,
|
|
4063
|
-
down:
|
|
4064
|
-
up:
|
|
4087
|
+
down: Br,
|
|
4088
|
+
up: qr
|
|
4065
4089
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4066
|
-
async function Ur(e) {
|
|
4067
|
-
}
|
|
4068
4090
|
async function Qr(e) {
|
|
4091
|
+
}
|
|
4092
|
+
async function Hr(e) {
|
|
4069
4093
|
await e.schema.alterTable("users").dropConstraint("unique_email_provider").execute();
|
|
4070
4094
|
}
|
|
4071
|
-
const
|
|
4095
|
+
const Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4072
4096
|
__proto__: null,
|
|
4073
|
-
down:
|
|
4074
|
-
up:
|
|
4097
|
+
down: Hr,
|
|
4098
|
+
up: Qr
|
|
4075
4099
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4076
|
-
async function
|
|
4100
|
+
async function Wr(e) {
|
|
4077
4101
|
await e.schema.alterTable("otps").dropColumn("state").execute(), await e.schema.alterTable("otps").addColumn("state", "varchar(8192)").execute();
|
|
4078
4102
|
}
|
|
4079
|
-
async function
|
|
4103
|
+
async function Gr(e) {
|
|
4080
4104
|
await e.schema.alterTable("otps").dropColumn("state").execute(), await e.schema.alterTable("otps").addColumn("state", "varchar(1024)").execute();
|
|
4081
4105
|
}
|
|
4082
|
-
const
|
|
4106
|
+
const Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4083
4107
|
__proto__: null,
|
|
4084
|
-
down:
|
|
4085
|
-
up:
|
|
4108
|
+
down: Gr,
|
|
4109
|
+
up: Wr
|
|
4086
4110
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4087
|
-
async function
|
|
4111
|
+
async function Xr(e) {
|
|
4088
4112
|
await e.schema.alterTable("tickets").dropColumn("state").execute(), await e.schema.alterTable("tickets").addColumn("state", "varchar(8192)").execute();
|
|
4089
4113
|
}
|
|
4090
|
-
async function
|
|
4114
|
+
async function Zr(e) {
|
|
4091
4115
|
await e.schema.alterTable("tickets").dropColumn("state").execute(), await e.schema.alterTable("tickets").addColumn("state", "varchar(1024)").execute();
|
|
4092
4116
|
}
|
|
4093
|
-
const
|
|
4117
|
+
const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4094
4118
|
__proto__: null,
|
|
4095
|
-
down:
|
|
4096
|
-
up:
|
|
4119
|
+
down: Zr,
|
|
4120
|
+
up: Xr
|
|
4097
4121
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4098
|
-
async function
|
|
4122
|
+
async function ts(e) {
|
|
4099
4123
|
await e.schema.createTable("branding").addColumn(
|
|
4100
4124
|
"tenant_id",
|
|
4101
4125
|
"varchar(255)",
|
|
4102
4126
|
(t) => t.references("tenants.id").onDelete("cascade").notNull().primaryKey()
|
|
4103
4127
|
).addColumn("logo_url", "varchar(512)").addColumn("favicon_url", "varchar(512)").addColumn("font_url", "varchar(512)").addColumn("colors_primary", "varchar(8)").addColumn("colors_page_background_type", "varchar(32)").addColumn("colors_page_background_start", "varchar(8)").addColumn("colors_page_background_end", "varchar(8)").addColumn("colors_page_background_angle_dev", "integer").execute();
|
|
4104
4128
|
}
|
|
4105
|
-
async function
|
|
4129
|
+
async function as(e) {
|
|
4106
4130
|
await e.schema.dropTable("branding").execute();
|
|
4107
4131
|
}
|
|
4108
|
-
const
|
|
4132
|
+
const ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4109
4133
|
__proto__: null,
|
|
4110
|
-
down:
|
|
4111
|
-
up:
|
|
4134
|
+
down: as,
|
|
4135
|
+
up: ts
|
|
4112
4136
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4113
|
-
async function ns(e) {
|
|
4114
|
-
}
|
|
4115
4137
|
async function os(e) {
|
|
4116
4138
|
}
|
|
4117
|
-
|
|
4139
|
+
async function rs(e) {
|
|
4140
|
+
}
|
|
4141
|
+
const ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4118
4142
|
__proto__: null,
|
|
4119
|
-
down:
|
|
4120
|
-
up:
|
|
4143
|
+
down: rs,
|
|
4144
|
+
up: os
|
|
4121
4145
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4122
|
-
async function ss(e) {
|
|
4123
|
-
}
|
|
4124
4146
|
async function is(e) {
|
|
4125
4147
|
}
|
|
4126
|
-
|
|
4148
|
+
async function cs(e) {
|
|
4149
|
+
}
|
|
4150
|
+
const ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4127
4151
|
__proto__: null,
|
|
4128
|
-
down:
|
|
4129
|
-
up:
|
|
4152
|
+
down: cs,
|
|
4153
|
+
up: is
|
|
4130
4154
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4131
|
-
async function ls(e) {
|
|
4132
|
-
}
|
|
4133
4155
|
async function ds(e) {
|
|
4134
4156
|
}
|
|
4135
|
-
|
|
4157
|
+
async function us(e) {
|
|
4158
|
+
}
|
|
4159
|
+
const _s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4136
4160
|
__proto__: null,
|
|
4137
|
-
down:
|
|
4138
|
-
up:
|
|
4161
|
+
down: us,
|
|
4162
|
+
up: ds
|
|
4139
4163
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4140
|
-
async function _s(e) {
|
|
4141
|
-
}
|
|
4142
4164
|
async function ms(e) {
|
|
4143
4165
|
}
|
|
4144
|
-
|
|
4166
|
+
async function hs(e) {
|
|
4167
|
+
}
|
|
4168
|
+
const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4145
4169
|
__proto__: null,
|
|
4146
|
-
down:
|
|
4147
|
-
up:
|
|
4170
|
+
down: hs,
|
|
4171
|
+
up: ms
|
|
4148
4172
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4149
|
-
async function
|
|
4173
|
+
async function fs(e) {
|
|
4150
4174
|
await e.schema.createTable("authentication_codes").addColumn(
|
|
4151
4175
|
"tenant_id",
|
|
4152
4176
|
"varchar(255)",
|
|
@@ -4157,55 +4181,55 @@ async function ps(e) {
|
|
|
4157
4181
|
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
4158
4182
|
).addColumn("user_id", "varchar(255)", (t) => t.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(8192)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4159
4183
|
}
|
|
4160
|
-
async function
|
|
4184
|
+
async function gs(e) {
|
|
4161
4185
|
await e.schema.dropTable("authentication_codes").execute();
|
|
4162
4186
|
}
|
|
4163
|
-
const
|
|
4187
|
+
const ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4164
4188
|
__proto__: null,
|
|
4165
|
-
down:
|
|
4166
|
-
up:
|
|
4189
|
+
down: gs,
|
|
4190
|
+
up: fs
|
|
4167
4191
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4168
|
-
async function ws(e) {
|
|
4169
|
-
}
|
|
4170
4192
|
async function ys(e) {
|
|
4171
4193
|
}
|
|
4172
|
-
|
|
4194
|
+
async function vs(e) {
|
|
4195
|
+
}
|
|
4196
|
+
const Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4173
4197
|
__proto__: null,
|
|
4174
|
-
down:
|
|
4175
|
-
up:
|
|
4198
|
+
down: vs,
|
|
4199
|
+
up: ys
|
|
4176
4200
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4177
|
-
async function
|
|
4201
|
+
async function xs(e) {
|
|
4178
4202
|
await e.schema.alterTable("otps").addColumn("ip", "varchar(64)").execute();
|
|
4179
4203
|
}
|
|
4180
|
-
async function
|
|
4204
|
+
async function Ts(e) {
|
|
4181
4205
|
await e.schema.alterTable("otps").dropColumn("ip").execute();
|
|
4182
4206
|
}
|
|
4183
|
-
const
|
|
4207
|
+
const Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4184
4208
|
__proto__: null,
|
|
4185
|
-
down:
|
|
4186
|
-
up:
|
|
4209
|
+
down: Ts,
|
|
4210
|
+
up: xs
|
|
4187
4211
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4188
|
-
async function
|
|
4212
|
+
async function bs(e) {
|
|
4189
4213
|
await e.schema.alterTable("logs").dropColumn("user_agent").execute(), await e.schema.alterTable("logs").addColumn("user_agent", "varchar(1024)").execute();
|
|
4190
4214
|
}
|
|
4191
|
-
async function
|
|
4215
|
+
async function Ss(e) {
|
|
4192
4216
|
await e.schema.alterTable("logs").dropColumn("user_agent").execute(), await e.schema.alterTable("logs").addColumn("user_agent", "varchar(255)").execute();
|
|
4193
4217
|
}
|
|
4194
|
-
const
|
|
4218
|
+
const Os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4195
4219
|
__proto__: null,
|
|
4196
|
-
down:
|
|
4197
|
-
up:
|
|
4220
|
+
down: Ss,
|
|
4221
|
+
up: bs
|
|
4198
4222
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4199
|
-
async function Os(e) {
|
|
4200
|
-
}
|
|
4201
4223
|
async function ks(e) {
|
|
4202
4224
|
}
|
|
4203
|
-
|
|
4225
|
+
async function $s(e) {
|
|
4226
|
+
}
|
|
4227
|
+
const Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4204
4228
|
__proto__: null,
|
|
4205
|
-
down:
|
|
4206
|
-
up:
|
|
4229
|
+
down: $s,
|
|
4230
|
+
up: ks
|
|
4207
4231
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4208
|
-
async function
|
|
4232
|
+
async function Is(e) {
|
|
4209
4233
|
await e.schema.createTable("hooks").addColumn("hook_id", "varchar(255)", (t) => t.notNull().primaryKey()).addColumn(
|
|
4210
4234
|
"tenant_id",
|
|
4211
4235
|
"varchar(255)",
|
|
@@ -4216,33 +4240,33 @@ async function Es(e) {
|
|
|
4216
4240
|
(t) => t.defaultTo(!1).notNull()
|
|
4217
4241
|
).addColumn("priority", "integer").execute();
|
|
4218
4242
|
}
|
|
4219
|
-
async function
|
|
4243
|
+
async function zs(e) {
|
|
4220
4244
|
await e.schema.dropTable("hooks").execute();
|
|
4221
4245
|
}
|
|
4222
|
-
const
|
|
4246
|
+
const Ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4223
4247
|
__proto__: null,
|
|
4224
|
-
down:
|
|
4225
|
-
up:
|
|
4248
|
+
down: zs,
|
|
4249
|
+
up: Is
|
|
4226
4250
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4227
|
-
async function Ps(e) {
|
|
4228
|
-
}
|
|
4229
4251
|
async function Ds(e) {
|
|
4230
4252
|
}
|
|
4231
|
-
|
|
4253
|
+
async function As(e) {
|
|
4254
|
+
}
|
|
4255
|
+
const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4232
4256
|
__proto__: null,
|
|
4233
|
-
down:
|
|
4234
|
-
up:
|
|
4257
|
+
down: As,
|
|
4258
|
+
up: Ds
|
|
4235
4259
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4236
|
-
async function js(e) {
|
|
4237
|
-
}
|
|
4238
4260
|
async function Fs(e) {
|
|
4239
4261
|
}
|
|
4240
|
-
|
|
4262
|
+
async function Rs(e) {
|
|
4263
|
+
}
|
|
4264
|
+
const Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4241
4265
|
__proto__: null,
|
|
4242
|
-
down:
|
|
4243
|
-
up:
|
|
4266
|
+
down: Rs,
|
|
4267
|
+
up: Fs
|
|
4244
4268
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4245
|
-
async function
|
|
4269
|
+
async function Js(e) {
|
|
4246
4270
|
await e.schema.createTable("logins").addColumn("login_id", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
4247
4271
|
"tenant_id",
|
|
4248
4272
|
"varchar(255)",
|
|
@@ -4259,7 +4283,7 @@ async function Ms(e) {
|
|
|
4259
4283
|
(t) => t.onDelete("cascade")
|
|
4260
4284
|
).addColumn("code_type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4261
4285
|
}
|
|
4262
|
-
async function
|
|
4286
|
+
async function Ls(e) {
|
|
4263
4287
|
await e.schema.dropTable("logins").execute(), await e.schema.alterTable("passwords").dropColumn("algorithm").execute(), await e.schema.dropTable("codes").execute(), await e.schema.createTable("codes").addColumn("id", "varchar(255)", (t) => t.primaryKey()).addColumn("code", "varchar(255)", (t) => t.notNull()).addColumn("user_id", "varchar(255)").addColumn("tenant_id", "varchar(255)").addForeignKeyConstraint(
|
|
4264
4288
|
"codes_user_id_tenant_id_constraint",
|
|
4265
4289
|
["user_id", "tenant_id"],
|
|
@@ -4268,90 +4292,90 @@ async function Js(e) {
|
|
|
4268
4292
|
(t) => t.onDelete("cascade")
|
|
4269
4293
|
).addColumn("type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4270
4294
|
}
|
|
4271
|
-
const
|
|
4295
|
+
const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4272
4296
|
__proto__: null,
|
|
4273
|
-
down:
|
|
4274
|
-
up:
|
|
4297
|
+
down: Ls,
|
|
4298
|
+
up: Js
|
|
4275
4299
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4276
|
-
async function Ks(e) {
|
|
4277
|
-
}
|
|
4278
4300
|
async function qs(e) {
|
|
4279
4301
|
}
|
|
4280
|
-
|
|
4302
|
+
async function Bs(e) {
|
|
4303
|
+
}
|
|
4304
|
+
const Us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4281
4305
|
__proto__: null,
|
|
4282
|
-
down:
|
|
4283
|
-
up:
|
|
4306
|
+
down: Bs,
|
|
4307
|
+
up: qs
|
|
4284
4308
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4285
|
-
async function
|
|
4309
|
+
async function Qs(e) {
|
|
4286
4310
|
await e.schema.alterTable("logins").addColumn("auth0Client", "varchar(256)").execute();
|
|
4287
4311
|
}
|
|
4288
|
-
async function
|
|
4312
|
+
async function Hs(e) {
|
|
4289
4313
|
await e.schema.alterTable("logins").dropColumn("auth0Client").execute();
|
|
4290
4314
|
}
|
|
4291
|
-
const
|
|
4315
|
+
const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4292
4316
|
__proto__: null,
|
|
4293
|
-
down:
|
|
4294
|
-
up:
|
|
4317
|
+
down: Hs,
|
|
4318
|
+
up: Qs
|
|
4295
4319
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4296
|
-
async function
|
|
4320
|
+
async function Ws(e) {
|
|
4297
4321
|
await e.schema.alterTable("logins").dropColumn("authParams_state").execute(), await e.schema.alterTable("logins").addColumn("authParams_state", "varchar(8192)").execute();
|
|
4298
4322
|
}
|
|
4299
|
-
async function
|
|
4323
|
+
async function Gs(e) {
|
|
4300
4324
|
await e.schema.alterTable("logins").dropColumn("authParams_state").execute(), await e.schema.alterTable("logins").addColumn("authParams_state", "varchar(511)").execute();
|
|
4301
4325
|
}
|
|
4302
|
-
const
|
|
4326
|
+
const Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4303
4327
|
__proto__: null,
|
|
4304
|
-
down:
|
|
4305
|
-
up:
|
|
4328
|
+
down: Gs,
|
|
4329
|
+
up: Ws
|
|
4306
4330
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4307
|
-
async function Vs(e) {
|
|
4308
|
-
}
|
|
4309
4331
|
async function Xs(e) {
|
|
4310
4332
|
}
|
|
4311
|
-
|
|
4333
|
+
async function Zs(e) {
|
|
4334
|
+
}
|
|
4335
|
+
const ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4312
4336
|
__proto__: null,
|
|
4313
|
-
down:
|
|
4314
|
-
up:
|
|
4337
|
+
down: Zs,
|
|
4338
|
+
up: Xs
|
|
4315
4339
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4316
|
-
async function ei(e) {
|
|
4317
|
-
}
|
|
4318
4340
|
async function ti(e) {
|
|
4319
4341
|
}
|
|
4320
|
-
|
|
4342
|
+
async function ai(e) {
|
|
4343
|
+
}
|
|
4344
|
+
const ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4321
4345
|
__proto__: null,
|
|
4322
|
-
down:
|
|
4323
|
-
up:
|
|
4346
|
+
down: ai,
|
|
4347
|
+
up: ti
|
|
4324
4348
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4325
|
-
async function
|
|
4349
|
+
async function oi(e) {
|
|
4326
4350
|
await e.schema.alterTable("logins").addColumn("authParams_nonce", "varchar(255)").execute();
|
|
4327
4351
|
}
|
|
4328
|
-
async function
|
|
4352
|
+
async function ri(e) {
|
|
4329
4353
|
await e.schema.alterTable("logins").dropColumn("nonce").execute();
|
|
4330
4354
|
}
|
|
4331
|
-
const
|
|
4355
|
+
const si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4332
4356
|
__proto__: null,
|
|
4333
|
-
down:
|
|
4334
|
-
up:
|
|
4357
|
+
down: ri,
|
|
4358
|
+
up: oi
|
|
4335
4359
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4336
|
-
async function si(e) {
|
|
4337
|
-
}
|
|
4338
4360
|
async function ii(e) {
|
|
4339
4361
|
}
|
|
4340
|
-
|
|
4362
|
+
async function ci(e) {
|
|
4363
|
+
}
|
|
4364
|
+
const li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4341
4365
|
__proto__: null,
|
|
4342
|
-
down:
|
|
4343
|
-
up:
|
|
4366
|
+
down: ci,
|
|
4367
|
+
up: ii
|
|
4344
4368
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4345
|
-
async function li(e) {
|
|
4346
|
-
}
|
|
4347
4369
|
async function di(e) {
|
|
4348
4370
|
}
|
|
4349
|
-
|
|
4371
|
+
async function ui(e) {
|
|
4372
|
+
}
|
|
4373
|
+
const _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4350
4374
|
__proto__: null,
|
|
4351
|
-
down:
|
|
4352
|
-
up:
|
|
4375
|
+
down: ui,
|
|
4376
|
+
up: di
|
|
4353
4377
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4354
|
-
async function
|
|
4378
|
+
async function mi(e) {
|
|
4355
4379
|
await e.schema.dropTable("codes").execute(), await e.schema.createTable("codes").addColumn("code_id", "varchar(255)", (t) => t.notNull()).addColumn(
|
|
4356
4380
|
"tenant_id",
|
|
4357
4381
|
"varchar(255)",
|
|
@@ -4367,7 +4391,7 @@ async function _i(e) {
|
|
|
4367
4391
|
"code_type"
|
|
4368
4392
|
]).execute();
|
|
4369
4393
|
}
|
|
4370
|
-
async function
|
|
4394
|
+
async function hi(e) {
|
|
4371
4395
|
await e.schema.dropTable("codes").execute(), await e.schema.createTable("codes").addColumn("code_id", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
4372
4396
|
"tenant_id",
|
|
4373
4397
|
"varchar(255)",
|
|
@@ -4380,15 +4404,15 @@ async function mi(e) {
|
|
|
4380
4404
|
(t) => t.onDelete("cascade")
|
|
4381
4405
|
).addColumn("code_type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4382
4406
|
}
|
|
4383
|
-
const
|
|
4407
|
+
const pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4384
4408
|
__proto__: null,
|
|
4385
|
-
down:
|
|
4386
|
-
up:
|
|
4409
|
+
down: hi,
|
|
4410
|
+
up: mi
|
|
4387
4411
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4388
|
-
async function
|
|
4412
|
+
async function fi(e) {
|
|
4389
4413
|
await e.schema.dropTable("otps").execute(), await e.schema.dropTable("authentication_codes").execute();
|
|
4390
4414
|
}
|
|
4391
|
-
async function
|
|
4415
|
+
async function gi(e) {
|
|
4392
4416
|
await e.schema.alterTable("keys").addColumn("private_key", "varchar(2048)").addColumn("public_key", "varchar(2048)").execute(), await e.schema.createTable("otps").addColumn(
|
|
4393
4417
|
"tenant_id",
|
|
4394
4418
|
"varchar(255)",
|
|
@@ -4407,32 +4431,32 @@ async function fi(e) {
|
|
|
4407
4431
|
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
4408
4432
|
).addColumn("user_id", "varchar(255)", (t) => t.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(8192)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4409
4433
|
}
|
|
4410
|
-
const
|
|
4434
|
+
const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4411
4435
|
__proto__: null,
|
|
4412
|
-
down:
|
|
4413
|
-
up:
|
|
4436
|
+
down: gi,
|
|
4437
|
+
up: fi
|
|
4414
4438
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4415
|
-
async function
|
|
4439
|
+
async function yi(e) {
|
|
4416
4440
|
await e.schema.createIndex("IDX_logs_tenant_date_type_user").on("logs").columns(["tenant_id", "date", "type", "user_id"]).execute();
|
|
4417
4441
|
}
|
|
4418
|
-
async function
|
|
4442
|
+
async function vi(e) {
|
|
4419
4443
|
await e.schema.dropIndex("IDX_logs_tenant_date_type_user").on("logs").execute();
|
|
4420
4444
|
}
|
|
4421
|
-
const
|
|
4445
|
+
const Ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4422
4446
|
__proto__: null,
|
|
4423
|
-
down:
|
|
4424
|
-
up:
|
|
4447
|
+
down: vi,
|
|
4448
|
+
up: yi
|
|
4425
4449
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4426
|
-
async function Ci(e) {
|
|
4427
|
-
}
|
|
4428
4450
|
async function xi(e) {
|
|
4429
4451
|
}
|
|
4430
|
-
|
|
4452
|
+
async function Ti(e) {
|
|
4453
|
+
}
|
|
4454
|
+
const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4431
4455
|
__proto__: null,
|
|
4432
|
-
down:
|
|
4433
|
-
up:
|
|
4456
|
+
down: Ti,
|
|
4457
|
+
up: xi
|
|
4434
4458
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4435
|
-
async function
|
|
4459
|
+
async function bi(e) {
|
|
4436
4460
|
await e.schema.createTable("prompt_settings").addColumn("tenant_id", "varchar(64)", (t) => t.primaryKey()).addColumn(
|
|
4437
4461
|
"universal_login_experience",
|
|
4438
4462
|
"varchar(16)",
|
|
@@ -4451,95 +4475,95 @@ async function Ni(e) {
|
|
|
4451
4475
|
(t) => t.defaultTo(!1).notNull()
|
|
4452
4476
|
).execute();
|
|
4453
4477
|
}
|
|
4454
|
-
async function
|
|
4478
|
+
async function Si(e) {
|
|
4455
4479
|
await e.schema.dropTable("prompt_settings").execute();
|
|
4456
4480
|
}
|
|
4457
|
-
const
|
|
4481
|
+
const Oi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4458
4482
|
__proto__: null,
|
|
4459
|
-
down:
|
|
4460
|
-
up:
|
|
4483
|
+
down: Si,
|
|
4484
|
+
up: bi
|
|
4461
4485
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4462
|
-
async function Oi(e) {
|
|
4463
|
-
}
|
|
4464
4486
|
async function ki(e) {
|
|
4465
4487
|
}
|
|
4466
|
-
|
|
4488
|
+
async function $i(e) {
|
|
4489
|
+
}
|
|
4490
|
+
const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4467
4491
|
__proto__: null,
|
|
4468
|
-
down:
|
|
4469
|
-
up:
|
|
4492
|
+
down: $i,
|
|
4493
|
+
up: ki
|
|
4470
4494
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4471
|
-
async function Ei(e) {
|
|
4472
|
-
}
|
|
4473
4495
|
async function Ii(e) {
|
|
4474
4496
|
}
|
|
4475
|
-
|
|
4497
|
+
async function zi(e) {
|
|
4498
|
+
}
|
|
4499
|
+
const Pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4476
4500
|
__proto__: null,
|
|
4477
|
-
down:
|
|
4478
|
-
up:
|
|
4501
|
+
down: zi,
|
|
4502
|
+
up: Ii
|
|
4479
4503
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4480
|
-
async function Pi(e) {
|
|
4481
|
-
}
|
|
4482
4504
|
async function Di(e) {
|
|
4483
4505
|
}
|
|
4484
|
-
|
|
4506
|
+
async function Ai(e) {
|
|
4507
|
+
}
|
|
4508
|
+
const ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4485
4509
|
__proto__: null,
|
|
4486
|
-
down:
|
|
4487
|
-
up:
|
|
4510
|
+
down: Ai,
|
|
4511
|
+
up: Di
|
|
4488
4512
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4489
|
-
async function
|
|
4513
|
+
async function Fi(e) {
|
|
4490
4514
|
await e.schema.alterTable("logins").addColumn("authParams_ui_locales", "varchar(32)").execute();
|
|
4491
4515
|
}
|
|
4492
|
-
async function
|
|
4516
|
+
async function Ri(e) {
|
|
4493
4517
|
await e.schema.alterTable("logins").dropColumn("authParams_ui_locales").execute();
|
|
4494
4518
|
}
|
|
4495
|
-
const
|
|
4519
|
+
const Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4496
4520
|
__proto__: null,
|
|
4497
|
-
down:
|
|
4498
|
-
up:
|
|
4521
|
+
down: Ri,
|
|
4522
|
+
up: Fi
|
|
4499
4523
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4500
|
-
async function
|
|
4524
|
+
async function Ji(e) {
|
|
4501
4525
|
await e.schema.alterTable("logins").addColumn("authParams_prompt", "varchar(16)").execute();
|
|
4502
4526
|
}
|
|
4503
|
-
async function
|
|
4527
|
+
async function Li(e) {
|
|
4504
4528
|
await e.schema.alterTable("logins").dropColumn("authParams_prompt").execute();
|
|
4505
4529
|
}
|
|
4506
|
-
const
|
|
4530
|
+
const Ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4507
4531
|
__proto__: null,
|
|
4508
|
-
down:
|
|
4509
|
-
up:
|
|
4532
|
+
down: Li,
|
|
4533
|
+
up: Ji
|
|
4510
4534
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4511
|
-
async function Ki(e) {
|
|
4512
|
-
}
|
|
4513
4535
|
async function qi(e) {
|
|
4514
4536
|
}
|
|
4515
|
-
|
|
4537
|
+
async function Bi(e) {
|
|
4538
|
+
}
|
|
4539
|
+
const Ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4516
4540
|
__proto__: null,
|
|
4517
|
-
down:
|
|
4518
|
-
up:
|
|
4541
|
+
down: Bi,
|
|
4542
|
+
up: qi
|
|
4519
4543
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4520
|
-
async function
|
|
4544
|
+
async function Qi(e) {
|
|
4521
4545
|
await e.schema.alterTable("logins").addColumn("authParams_act_as", "varchar(255)").execute();
|
|
4522
4546
|
}
|
|
4523
|
-
async function
|
|
4547
|
+
async function Hi(e) {
|
|
4524
4548
|
await e.schema.alterTable("logins").dropColumn("authParam_act_as").execute();
|
|
4525
4549
|
}
|
|
4526
|
-
const
|
|
4550
|
+
const Yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4527
4551
|
__proto__: null,
|
|
4528
|
-
down:
|
|
4529
|
-
up:
|
|
4552
|
+
down: Hi,
|
|
4553
|
+
up: Qi
|
|
4530
4554
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4531
|
-
async function
|
|
4555
|
+
async function Wi(e) {
|
|
4532
4556
|
await e.schema.alterTable("codes").addColumn("code_verifier", "varchar(128)").execute();
|
|
4533
4557
|
}
|
|
4534
|
-
async function
|
|
4558
|
+
async function Gi(e) {
|
|
4535
4559
|
await e.schema.alterTable("codes").dropColumn("code_verifier").execute();
|
|
4536
4560
|
}
|
|
4537
|
-
const
|
|
4561
|
+
const Vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4538
4562
|
__proto__: null,
|
|
4539
|
-
down:
|
|
4540
|
-
up:
|
|
4563
|
+
down: Gi,
|
|
4564
|
+
up: Wi
|
|
4541
4565
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4542
|
-
async function
|
|
4566
|
+
async function Xi(e) {
|
|
4543
4567
|
await e.schema.createTable("email_providers").addColumn("tenant_id", "varchar(255)", (t) => t.primaryKey()).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("enabled", "boolean", (t) => t.notNull()).addColumn("default_from_address", "varchar(255)").addColumn(
|
|
4544
4568
|
"credentials",
|
|
4545
4569
|
"varchar(2048)",
|
|
@@ -4550,18 +4574,18 @@ async function Vi(e) {
|
|
|
4550
4574
|
(t) => t.notNull().defaultTo("{}")
|
|
4551
4575
|
).addColumn("created_at", "varchar(29)", (t) => t.notNull()).addColumn("updated_at", "varchar(29)", (t) => t.notNull()).execute();
|
|
4552
4576
|
}
|
|
4553
|
-
async function
|
|
4577
|
+
async function Zi(e) {
|
|
4554
4578
|
await e.schema.dropTable("email_providers").execute();
|
|
4555
4579
|
}
|
|
4556
|
-
const
|
|
4580
|
+
const ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4557
4581
|
__proto__: null,
|
|
4558
|
-
down:
|
|
4559
|
-
up:
|
|
4582
|
+
down: Zi,
|
|
4583
|
+
up: Xi
|
|
4560
4584
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4561
|
-
async function
|
|
4585
|
+
async function tc(e) {
|
|
4562
4586
|
await e.schema.dropTable("tickets").execute();
|
|
4563
4587
|
}
|
|
4564
|
-
async function
|
|
4588
|
+
async function ac(e) {
|
|
4565
4589
|
await e.schema.createTable("tickets").addColumn(
|
|
4566
4590
|
"tenant_id",
|
|
4567
4591
|
"varchar(255)",
|
|
@@ -4572,22 +4596,22 @@ async function tc(e) {
|
|
|
4572
4596
|
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
4573
4597
|
).addColumn("email", "varchar(255)", (t) => t.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(1024)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4574
4598
|
}
|
|
4575
|
-
const
|
|
4599
|
+
const nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4576
4600
|
__proto__: null,
|
|
4577
|
-
down:
|
|
4578
|
-
up:
|
|
4601
|
+
down: ac,
|
|
4602
|
+
up: tc
|
|
4579
4603
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4580
|
-
async function nc(e) {
|
|
4581
|
-
}
|
|
4582
4604
|
async function oc(e) {
|
|
4605
|
+
}
|
|
4606
|
+
async function rc(e) {
|
|
4583
4607
|
await e.schema.alterTable("logins").dropColumn("ip").dropColumn("useragent").execute();
|
|
4584
4608
|
}
|
|
4585
|
-
const
|
|
4609
|
+
const sc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4586
4610
|
__proto__: null,
|
|
4587
|
-
down:
|
|
4588
|
-
up:
|
|
4611
|
+
down: rc,
|
|
4612
|
+
up: oc
|
|
4589
4613
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4590
|
-
async function
|
|
4614
|
+
async function ic(e) {
|
|
4591
4615
|
await e.schema.createTable("refresh_tokens").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn(
|
|
4592
4616
|
"client_id",
|
|
4593
4617
|
"varchar(21)",
|
|
@@ -4600,27 +4624,27 @@ async function sc(e) {
|
|
|
4600
4624
|
(t) => t.onDelete("cascade")
|
|
4601
4625
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4602
4626
|
}
|
|
4603
|
-
async function
|
|
4627
|
+
async function cc(e) {
|
|
4604
4628
|
await e.schema.dropTable("refresh_tokens").execute();
|
|
4605
4629
|
}
|
|
4606
|
-
const
|
|
4630
|
+
const lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4607
4631
|
__proto__: null,
|
|
4608
|
-
down:
|
|
4609
|
-
up:
|
|
4632
|
+
down: cc,
|
|
4633
|
+
up: ic
|
|
4610
4634
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4611
|
-
async function lc(e) {
|
|
4612
|
-
}
|
|
4613
4635
|
async function dc(e) {
|
|
4614
4636
|
}
|
|
4615
|
-
|
|
4637
|
+
async function uc(e) {
|
|
4638
|
+
}
|
|
4639
|
+
const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4616
4640
|
__proto__: null,
|
|
4617
|
-
down:
|
|
4618
|
-
up:
|
|
4641
|
+
down: uc,
|
|
4642
|
+
up: dc
|
|
4619
4643
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4620
|
-
async function
|
|
4644
|
+
async function mc(e) {
|
|
4621
4645
|
await e.schema.dropTable("sessions").execute(), await e.schema.dropTable("refresh_tokens").execute();
|
|
4622
4646
|
}
|
|
4623
|
-
async function
|
|
4647
|
+
async function hc(e) {
|
|
4624
4648
|
await e.schema.createTable("sessions").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4625
4649
|
"sessions_user_id_constraint",
|
|
4626
4650
|
["user_id", "tenant_id"],
|
|
@@ -4639,12 +4663,12 @@ async function mc(e) {
|
|
|
4639
4663
|
(t) => t.onDelete("cascade")
|
|
4640
4664
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4641
4665
|
}
|
|
4642
|
-
const
|
|
4666
|
+
const pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4643
4667
|
__proto__: null,
|
|
4644
|
-
down:
|
|
4645
|
-
up:
|
|
4668
|
+
down: hc,
|
|
4669
|
+
up: mc
|
|
4646
4670
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4647
|
-
async function
|
|
4671
|
+
async function fc(e) {
|
|
4648
4672
|
await e.schema.createTable("sessions_2").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4649
4673
|
"sessions_2_user_id_constraint",
|
|
4650
4674
|
["user_id", "tenant_id"],
|
|
@@ -4663,15 +4687,15 @@ async function pc(e) {
|
|
|
4663
4687
|
(t) => t.onDelete("cascade")
|
|
4664
4688
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4665
4689
|
}
|
|
4666
|
-
async function
|
|
4690
|
+
async function gc(e) {
|
|
4667
4691
|
await e.schema.dropTable("sessions_2").execute(), await e.schema.dropTable("refresh_tokens_2").execute();
|
|
4668
4692
|
}
|
|
4669
|
-
const
|
|
4693
|
+
const wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4670
4694
|
__proto__: null,
|
|
4671
|
-
down:
|
|
4672
|
-
up:
|
|
4695
|
+
down: gc,
|
|
4696
|
+
up: fc
|
|
4673
4697
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4674
|
-
async function
|
|
4698
|
+
async function yc(e) {
|
|
4675
4699
|
await e.schema.createTable("custom_domains").addColumn(
|
|
4676
4700
|
"custom_domain_id",
|
|
4677
4701
|
"varchar(21)",
|
|
@@ -4682,49 +4706,49 @@ async function wc(e) {
|
|
|
4682
4706
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4683
4707
|
).addColumn("domain", "varchar(255)", (t) => t.notNull()).addColumn("primary", "boolean", (t) => t.notNull()).addColumn("status", "varchar(50)", (t) => t.notNull()).addColumn("type", "varchar(50)", (t) => t.notNull()).addColumn("origin_domain_name", "varchar(255)").addColumn("verification", "varchar(2048)").addColumn("custom_client_ip_header", "varchar(50)").addColumn("tls_policy", "varchar(50)").addColumn("domain_metadata", "varchar(2048)").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute(), await e.schema.dropTable("domains").execute();
|
|
4684
4708
|
}
|
|
4685
|
-
async function
|
|
4709
|
+
async function vc(e) {
|
|
4686
4710
|
await e.schema.dropTable("custom_domains").execute(), await e.schema.createTable("domains").addColumn("id", "varchar(255)", (t) => t.notNull().primaryKey()).addColumn(
|
|
4687
4711
|
"tenant_id",
|
|
4688
4712
|
"varchar(255)",
|
|
4689
4713
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4690
4714
|
).addColumn("domain", "varchar(255)", (t) => t.notNull()).addColumn("email_service", "varchar(255)").addColumn("email_api_key", "varchar(255)").addColumn("dkim_private_key", "varchar(2048)").addColumn("dkim_public_key", "varchar(2048)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute();
|
|
4691
4715
|
}
|
|
4692
|
-
const
|
|
4716
|
+
const Cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4693
4717
|
__proto__: null,
|
|
4694
|
-
down:
|
|
4695
|
-
up:
|
|
4718
|
+
down: vc,
|
|
4719
|
+
up: yc
|
|
4696
4720
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4697
|
-
async function Cc(e) {
|
|
4698
|
-
}
|
|
4699
4721
|
async function xc(e) {
|
|
4722
|
+
}
|
|
4723
|
+
async function Tc(e) {
|
|
4700
4724
|
await e.schema.alterTable("logins").dropColumn("authParams_organization").dropColumn("authorization_url").execute();
|
|
4701
4725
|
}
|
|
4702
|
-
const
|
|
4726
|
+
const Nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4703
4727
|
__proto__: null,
|
|
4704
|
-
down:
|
|
4705
|
-
up:
|
|
4728
|
+
down: Tc,
|
|
4729
|
+
up: xc
|
|
4706
4730
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4707
|
-
async function
|
|
4731
|
+
async function bc(e) {
|
|
4708
4732
|
await e.schema.alterTable("logins").dropColumn("authorization_url").execute(), await e.schema.alterTable("logins").addColumn("authorization_url", "varchar(2048)").execute();
|
|
4709
4733
|
}
|
|
4710
|
-
async function
|
|
4734
|
+
async function Sc(e) {
|
|
4711
4735
|
await e.schema.alterTable("logins").dropColumn("authorization_url").execute(), await e.schema.alterTable("logins").addColumn("authorization_url", "varchar(1024)").execute();
|
|
4712
4736
|
}
|
|
4713
|
-
const
|
|
4737
|
+
const Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4714
4738
|
__proto__: null,
|
|
4715
|
-
down:
|
|
4716
|
-
up:
|
|
4739
|
+
down: Sc,
|
|
4740
|
+
up: bc
|
|
4717
4741
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4718
|
-
async function Oc(e) {
|
|
4719
|
-
}
|
|
4720
4742
|
async function kc(e) {
|
|
4721
4743
|
}
|
|
4722
|
-
|
|
4744
|
+
async function $c(e) {
|
|
4745
|
+
}
|
|
4746
|
+
const Ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4723
4747
|
__proto__: null,
|
|
4724
|
-
down:
|
|
4725
|
-
up:
|
|
4748
|
+
down: $c,
|
|
4749
|
+
up: kc
|
|
4726
4750
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4727
|
-
async function
|
|
4751
|
+
async function Ic(e) {
|
|
4728
4752
|
await e.schema.createTable("sessions").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4729
4753
|
"sessions_user_id_constraint",
|
|
4730
4754
|
["user_id", "tenant_id"],
|
|
@@ -4751,25 +4775,25 @@ async function Ec(e) {
|
|
|
4751
4775
|
(t) => t.onDelete("cascade")
|
|
4752
4776
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4753
4777
|
}
|
|
4754
|
-
async function
|
|
4778
|
+
async function zc(e) {
|
|
4755
4779
|
await e.schema.dropTable("sessions").execute(), await e.schema.dropTable("login_sessions").execute(), await e.schema.dropTable("refresh_tokens").execute();
|
|
4756
4780
|
}
|
|
4757
|
-
const
|
|
4781
|
+
const Pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4758
4782
|
__proto__: null,
|
|
4759
|
-
down:
|
|
4760
|
-
up:
|
|
4783
|
+
down: zc,
|
|
4784
|
+
up: Ic
|
|
4761
4785
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4762
|
-
async function
|
|
4786
|
+
async function Dc(e) {
|
|
4763
4787
|
await e.schema.dropTable("logins").execute(), await e.schema.dropTable("sessions_2").execute(), await e.schema.dropTable("refresh_tokens_2").execute();
|
|
4764
4788
|
}
|
|
4765
|
-
async function
|
|
4789
|
+
async function Ac(e) {
|
|
4766
4790
|
}
|
|
4767
|
-
const
|
|
4791
|
+
const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4768
4792
|
__proto__: null,
|
|
4769
|
-
down:
|
|
4770
|
-
up:
|
|
4793
|
+
down: Ac,
|
|
4794
|
+
up: Dc
|
|
4771
4795
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4772
|
-
async function
|
|
4796
|
+
async function Fc(e) {
|
|
4773
4797
|
await e.schema.dropTable("custom_domains").execute(), await e.schema.createTable("custom_domains").addColumn(
|
|
4774
4798
|
"custom_domain_id",
|
|
4775
4799
|
"varchar(256)",
|
|
@@ -4780,120 +4804,120 @@ async function jc(e) {
|
|
|
4780
4804
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4781
4805
|
).addColumn("domain", "varchar(255)", (t) => t.notNull()).addColumn("primary", "boolean", (t) => t.notNull()).addColumn("status", "varchar(50)", (t) => t.notNull()).addColumn("type", "varchar(50)", (t) => t.notNull()).addColumn("origin_domain_name", "varchar(255)").addColumn("verification", "varchar(2048)").addColumn("custom_client_ip_header", "varchar(50)").addColumn("tls_policy", "varchar(50)").addColumn("domain_metadata", "varchar(2048)").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute();
|
|
4782
4806
|
}
|
|
4783
|
-
async function
|
|
4807
|
+
async function Rc(e) {
|
|
4784
4808
|
}
|
|
4785
|
-
const
|
|
4809
|
+
const Mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4786
4810
|
__proto__: null,
|
|
4787
|
-
down:
|
|
4788
|
-
up:
|
|
4811
|
+
down: Rc,
|
|
4812
|
+
up: Fc
|
|
4789
4813
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4790
|
-
async function Mc(e) {
|
|
4791
|
-
}
|
|
4792
4814
|
async function Jc(e) {
|
|
4815
|
+
}
|
|
4816
|
+
async function Lc(e) {
|
|
4793
4817
|
await e.schema.alterTable("users").dropColumn("phone_number").dropColumn("phone_verified").dropColumn("username").execute();
|
|
4794
4818
|
}
|
|
4795
|
-
const
|
|
4819
|
+
const Kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4796
4820
|
__proto__: null,
|
|
4797
|
-
down:
|
|
4798
|
-
up:
|
|
4821
|
+
down: Lc,
|
|
4822
|
+
up: Jc
|
|
4799
4823
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4800
|
-
async function
|
|
4824
|
+
async function qc(e) {
|
|
4801
4825
|
await e.schema.createTable("forms").addColumn("id", "varchar(255)", (t) => t.primaryKey()).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("tenant_id", "varchar(255)", (t) => t.notNull()).addColumn("messages", "varchar(255)").addColumn("languages", "varchar(255)").addColumn("translations", "varchar(4096)").addColumn("nodes", "varchar(4096)").addColumn("start", "varchar(255)").addColumn("ending", "varchar(255)").addColumn("style", "varchar(1042)").addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute(), await e.schema.createIndex("forms_tenant_id_idx").on("forms").column("tenant_id").execute();
|
|
4802
4826
|
}
|
|
4803
|
-
async function
|
|
4827
|
+
async function Bc(e) {
|
|
4804
4828
|
await e.schema.dropTable("forms").execute();
|
|
4805
4829
|
}
|
|
4806
|
-
const
|
|
4830
|
+
const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4807
4831
|
__proto__: null,
|
|
4808
|
-
down:
|
|
4809
|
-
up:
|
|
4832
|
+
down: Bc,
|
|
4833
|
+
up: qc
|
|
4810
4834
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4811
|
-
async function
|
|
4835
|
+
async function Qc(e) {
|
|
4812
4836
|
await e.schema.alterTable("hooks").addColumn("form_id", "text").execute(), await e.schema.alterTable("hooks").addColumn("url_tmp", "varchar(512)").execute(), await e.updateTable("hooks").set((t) => ({ url_tmp: t.ref("url") })).execute(), await e.schema.alterTable("hooks").dropColumn("url").execute(), await e.schema.alterTable("hooks").renameColumn("url_tmp", "url").execute();
|
|
4813
4837
|
}
|
|
4814
|
-
async function
|
|
4838
|
+
async function Hc(e) {
|
|
4815
4839
|
await e.schema.dropTable("hooks").ifExists().execute(), await e.schema.createTable("hooks").addColumn("hook_id", "text", (t) => t.primaryKey()).addColumn("tenant_id", "text", (t) => t.notNull()).addColumn("trigger_id", "text", (t) => t.notNull()).addColumn("enabled", "integer", (t) => t.notNull().defaultTo(0)).addColumn("url", "varchar(512)", (t) => t.notNull()).addColumn("synchronous", "integer", (t) => t.notNull().defaultTo(0)).addColumn("priority", "integer").addColumn("created_at", "text", (t) => t.notNull()).addColumn("updated_at", "text", (t) => t.notNull()).execute();
|
|
4816
4840
|
}
|
|
4817
|
-
const
|
|
4841
|
+
const Yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4818
4842
|
__proto__: null,
|
|
4819
|
-
down:
|
|
4820
|
-
up:
|
|
4843
|
+
down: Hc,
|
|
4844
|
+
up: Qc
|
|
4821
4845
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4822
|
-
async function
|
|
4846
|
+
async function Wc(e) {
|
|
4823
4847
|
await e.schema.alterTable("login_sessions").addColumn(
|
|
4824
4848
|
"login_completed",
|
|
4825
4849
|
"boolean",
|
|
4826
4850
|
(t) => t.notNull().defaultTo(0)
|
|
4827
4851
|
).execute();
|
|
4828
4852
|
}
|
|
4829
|
-
async function
|
|
4853
|
+
async function Gc(e) {
|
|
4830
4854
|
await e.schema.alterTable("login_sessions").dropColumn("login_completed").execute();
|
|
4831
4855
|
}
|
|
4832
|
-
const
|
|
4856
|
+
const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4833
4857
|
__proto__: null,
|
|
4834
|
-
down:
|
|
4835
|
-
up:
|
|
4858
|
+
down: Gc,
|
|
4859
|
+
up: Wc
|
|
4836
4860
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4837
|
-
async function
|
|
4861
|
+
async function Xc(e) {
|
|
4838
4862
|
await e.schema.alterTable("sessions").addColumn(
|
|
4839
4863
|
"login_session_id",
|
|
4840
4864
|
"varchar(21)",
|
|
4841
4865
|
(t) => t.references("login_sessions.id").onDelete("set null")
|
|
4842
4866
|
).execute();
|
|
4843
4867
|
}
|
|
4844
|
-
async function
|
|
4868
|
+
async function Zc(e) {
|
|
4845
4869
|
await e.schema.alterTable("sessions").dropColumn("login_session_id").execute();
|
|
4846
4870
|
}
|
|
4847
|
-
const
|
|
4871
|
+
const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4848
4872
|
__proto__: null,
|
|
4849
|
-
down:
|
|
4850
|
-
up:
|
|
4873
|
+
down: Zc,
|
|
4874
|
+
up: Xc
|
|
4851
4875
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4852
|
-
async function
|
|
4876
|
+
async function tl(e) {
|
|
4853
4877
|
await e.schema.createIndex("IDX_sessions_login_session_id").on("sessions").column("login_session_id").execute();
|
|
4854
4878
|
}
|
|
4855
|
-
async function
|
|
4879
|
+
async function al(e) {
|
|
4856
4880
|
await e.schema.dropIndex("IDX_sessions_login_session_id").on("sessions").execute();
|
|
4857
4881
|
}
|
|
4858
|
-
const
|
|
4882
|
+
const nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4859
4883
|
__proto__: null,
|
|
4860
|
-
down:
|
|
4861
|
-
up:
|
|
4884
|
+
down: al,
|
|
4885
|
+
up: tl
|
|
4862
4886
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4863
|
-
async function
|
|
4887
|
+
async function ol(e) {
|
|
4864
4888
|
await e.schema.alterTable("codes").addColumn("code_challenge", "varchar(128)").execute(), await e.schema.alterTable("codes").addColumn("code_challenge_method", "varchar(5)").execute();
|
|
4865
4889
|
}
|
|
4866
|
-
async function
|
|
4890
|
+
async function rl(e) {
|
|
4867
4891
|
await e.schema.alterTable("codes").dropColumn("code_challenge").execute(), await e.schema.alterTable("codes").dropColumn("code_challenge_method").execute();
|
|
4868
4892
|
}
|
|
4869
|
-
const
|
|
4893
|
+
const sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4870
4894
|
__proto__: null,
|
|
4871
|
-
down:
|
|
4872
|
-
up:
|
|
4895
|
+
down: rl,
|
|
4896
|
+
up: ol
|
|
4873
4897
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4874
|
-
async function
|
|
4898
|
+
async function il(e) {
|
|
4875
4899
|
await e.schema.alterTable("codes").addColumn("redirect_uri", "varchar(1024)").execute();
|
|
4876
4900
|
}
|
|
4877
|
-
async function
|
|
4901
|
+
async function cl(e) {
|
|
4878
4902
|
await e.schema.alterTable("codes").dropColumn("redirect_uri").execute();
|
|
4879
4903
|
}
|
|
4880
|
-
const
|
|
4904
|
+
const ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4881
4905
|
__proto__: null,
|
|
4882
|
-
down:
|
|
4883
|
-
up:
|
|
4906
|
+
down: cl,
|
|
4907
|
+
up: il
|
|
4884
4908
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4885
|
-
async function
|
|
4909
|
+
async function dl(e) {
|
|
4886
4910
|
await e.schema.alterTable("codes").addColumn("nonce", "varchar(1024)").execute(), await e.schema.alterTable("codes").addColumn("state", "varchar(2048)").execute();
|
|
4887
4911
|
}
|
|
4888
|
-
async function
|
|
4912
|
+
async function ul(e) {
|
|
4889
4913
|
await e.schema.alterTable("codes").dropColumn("nonce").execute(), await e.schema.alterTable("codes").dropColumn("state").execute();
|
|
4890
4914
|
}
|
|
4891
|
-
const
|
|
4915
|
+
const _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4892
4916
|
__proto__: null,
|
|
4893
|
-
down:
|
|
4894
|
-
up:
|
|
4917
|
+
down: ul,
|
|
4918
|
+
up: dl
|
|
4895
4919
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4896
|
-
async function
|
|
4920
|
+
async function ml(e) {
|
|
4897
4921
|
await e.schema.createTable("themes").addColumn(
|
|
4898
4922
|
"tenant_id",
|
|
4899
4923
|
"varchar(255)",
|
|
@@ -4968,26 +4992,26 @@ async function _l(e) {
|
|
|
4968
4992
|
(t) => t.notNull()
|
|
4969
4993
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("themes_pkey", ["tenant_id", "themeId"]).execute(), await e.schema.createIndex("themes_tenant_id_idx").on("themes").column("tenant_id").execute();
|
|
4970
4994
|
}
|
|
4971
|
-
async function
|
|
4995
|
+
async function hl(e) {
|
|
4972
4996
|
await e.schema.dropTable("themes").execute();
|
|
4973
4997
|
}
|
|
4974
|
-
const
|
|
4998
|
+
const pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4975
4999
|
__proto__: null,
|
|
4976
|
-
down:
|
|
4977
|
-
up:
|
|
5000
|
+
down: hl,
|
|
5001
|
+
up: ml
|
|
4978
5002
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4979
|
-
async function
|
|
5003
|
+
async function fl(e) {
|
|
4980
5004
|
await e.schema.createTable("resource_servers").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("identifier", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("scopes", "varchar(4096)").addColumn("signing_alg", "varchar(64)").addColumn("signing_secret", "varchar(2048)").addColumn("token_lifetime", "integer").addColumn("token_lifetime_for_web", "integer").addColumn("skip_consent_for_verifiable_first_party_clients", "integer").addColumn("allow_offline_access", "integer").addColumn("verification_key", "varchar(4096)").addColumn("options", "varchar(4096)").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("resource_servers_pk", ["tenant_id", "id"]).execute(), await e.schema.createIndex("resource_servers_tenant_identifier_uq").on("resource_servers").columns(["tenant_id", "identifier"]).unique().execute(), await e.schema.createTable("roles").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(50)", (t) => t.notNull()).addColumn("description", "varchar(255)").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("roles_pk", ["tenant_id", "id"]).execute(), await e.schema.createIndex("roles_tenant_name_uq").on("roles").columns(["tenant_id", "name"]).unique().execute();
|
|
4981
5005
|
}
|
|
4982
|
-
async function
|
|
5006
|
+
async function gl(e) {
|
|
4983
5007
|
await e.schema.dropTable("roles").execute(), await e.schema.dropTable("resource_servers").execute();
|
|
4984
5008
|
}
|
|
4985
|
-
const
|
|
5009
|
+
const wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4986
5010
|
__proto__: null,
|
|
4987
|
-
down:
|
|
4988
|
-
up:
|
|
5011
|
+
down: gl,
|
|
5012
|
+
up: fl
|
|
4989
5013
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4990
|
-
async function
|
|
5014
|
+
async function yl(e) {
|
|
4991
5015
|
await e.schema.createTable("role_permissions").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("role_id", "varchar(21)", (t) => t.notNull()).addColumn(
|
|
4992
5016
|
"resource_server_identifier",
|
|
4993
5017
|
"varchar(191)",
|
|
@@ -5008,66 +5032,66 @@ async function wl(e) {
|
|
|
5008
5032
|
"permission_name"
|
|
5009
5033
|
]).execute(), await e.schema.createIndex("user_permissions_user_fk").on("user_permissions").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_permissions_permission_fk").on("user_permissions").columns(["tenant_id", "resource_server_identifier", "permission_name"]).execute();
|
|
5010
5034
|
}
|
|
5011
|
-
async function
|
|
5035
|
+
async function vl(e) {
|
|
5012
5036
|
await e.schema.dropTable("user_permissions").execute(), await e.schema.dropTable("role_permissions").execute();
|
|
5013
5037
|
}
|
|
5014
|
-
const
|
|
5038
|
+
const Cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5015
5039
|
__proto__: null,
|
|
5016
|
-
down:
|
|
5017
|
-
up:
|
|
5040
|
+
down: vl,
|
|
5041
|
+
up: yl
|
|
5018
5042
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5019
|
-
async function
|
|
5043
|
+
async function xl(e) {
|
|
5020
5044
|
await e.schema.createTable("user_roles").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn("role_id", "varchar(21)", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("user_roles_pk", [
|
|
5021
5045
|
"tenant_id",
|
|
5022
5046
|
"user_id",
|
|
5023
5047
|
"role_id"
|
|
5024
5048
|
]).execute(), await e.schema.createIndex("user_roles_user_fk").on("user_roles").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_roles_role_fk").on("user_roles").columns(["tenant_id", "role_id"]).execute();
|
|
5025
5049
|
}
|
|
5026
|
-
async function
|
|
5050
|
+
async function Tl(e) {
|
|
5027
5051
|
await e.schema.dropTable("user_roles").execute();
|
|
5028
5052
|
}
|
|
5029
|
-
const
|
|
5053
|
+
const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5030
5054
|
__proto__: null,
|
|
5031
|
-
down:
|
|
5032
|
-
up:
|
|
5055
|
+
down: Tl,
|
|
5056
|
+
up: xl
|
|
5033
5057
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5034
|
-
async function Nl(e) {
|
|
5035
|
-
}
|
|
5036
5058
|
async function bl(e) {
|
|
5059
|
+
}
|
|
5060
|
+
async function Sl(e) {
|
|
5037
5061
|
await e.schema.alterTable("keys").dropColumn("connection").execute(), await e.schema.alterTable("keys").modifyColumn("cert", "varchar(2048)").execute(), await e.schema.alterTable("keys").modifyColumn("pkcs7", "varchar(2048)").execute(), await e.schema.alterTable("keys").dropColumn("type").execute();
|
|
5038
5062
|
}
|
|
5039
|
-
const
|
|
5063
|
+
const Ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5040
5064
|
__proto__: null,
|
|
5041
|
-
down:
|
|
5042
|
-
up:
|
|
5065
|
+
down: Sl,
|
|
5066
|
+
up: bl
|
|
5043
5067
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5044
|
-
async function
|
|
5068
|
+
async function kl(e) {
|
|
5045
5069
|
await e.schema.createTable("organizations").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(256)", (t) => t.notNull()).addColumn("display_name", "varchar(256)").addColumn("branding", "text").addColumn("metadata", "text").addColumn("enabled_connections", "text").addColumn("token_quota", "text").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute(), await e.schema.createIndex("idx_organizations_tenant_id").on("organizations").column("tenant_id").execute(), await e.schema.createIndex("idx_organizations_tenant_name_unique").on("organizations").columns(["tenant_id", "name"]).unique().execute();
|
|
5046
5070
|
}
|
|
5047
|
-
async function
|
|
5071
|
+
async function $l(e) {
|
|
5048
5072
|
await e.schema.dropTable("organizations").execute();
|
|
5049
5073
|
}
|
|
5050
|
-
const
|
|
5074
|
+
const El = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5051
5075
|
__proto__: null,
|
|
5052
|
-
down:
|
|
5053
|
-
up:
|
|
5076
|
+
down: $l,
|
|
5077
|
+
up: kl
|
|
5054
5078
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5055
|
-
async function
|
|
5079
|
+
async function Il(e) {
|
|
5056
5080
|
await e.schema.createTable("user_organizations").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn("organization_id", "varchar(21)", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addUniqueConstraint("user_organizations_unique", [
|
|
5057
5081
|
"tenant_id",
|
|
5058
5082
|
"user_id",
|
|
5059
5083
|
"organization_id"
|
|
5060
5084
|
]).execute(), await e.schema.createIndex("idx_user_organizations_tenant_id").on("user_organizations").column("tenant_id").execute(), await e.schema.createIndex("idx_user_organizations_user_id").on("user_organizations").column("user_id").execute(), await e.schema.createIndex("idx_user_organizations_organization_id").on("user_organizations").column("organization_id").execute();
|
|
5061
5085
|
}
|
|
5062
|
-
async function
|
|
5086
|
+
async function zl(e) {
|
|
5063
5087
|
await e.schema.dropTable("user_organizations").execute();
|
|
5064
5088
|
}
|
|
5065
|
-
const
|
|
5089
|
+
const Pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5066
5090
|
__proto__: null,
|
|
5067
|
-
down:
|
|
5068
|
-
up:
|
|
5091
|
+
down: zl,
|
|
5092
|
+
up: Il
|
|
5069
5093
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5070
|
-
async function
|
|
5094
|
+
async function Dl(e) {
|
|
5071
5095
|
await e.schema.dropTable("user_permissions").execute(), await e.schema.dropTable("user_roles").execute(), await e.schema.createTable("user_permissions").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn(
|
|
5072
5096
|
"resource_server_identifier",
|
|
5073
5097
|
"varchar(21)",
|
|
@@ -5093,7 +5117,7 @@ async function Pl(e) {
|
|
|
5093
5117
|
"organization_id"
|
|
5094
5118
|
]).execute(), await e.schema.createIndex("user_roles_user_fk").on("user_roles").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_roles_role_fk").on("user_roles").columns(["tenant_id", "role_id"]).execute(), await e.schema.createIndex("user_roles_organization_fk").on("user_roles").column("organization_id").execute();
|
|
5095
5119
|
}
|
|
5096
|
-
async function
|
|
5120
|
+
async function Al(e) {
|
|
5097
5121
|
await e.schema.dropTable("user_permissions").execute(), await e.schema.dropTable("user_roles").execute(), await e.schema.createTable("user_permissions").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn(
|
|
5098
5122
|
"resource_server_identifier",
|
|
5099
5123
|
"varchar(191)",
|
|
@@ -5109,12 +5133,12 @@ async function Dl(e) {
|
|
|
5109
5133
|
"role_id"
|
|
5110
5134
|
]).execute(), await e.schema.createIndex("user_roles_user_fk").on("user_roles").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_roles_role_fk").on("user_roles").columns(["tenant_id", "role_id"]).execute();
|
|
5111
5135
|
}
|
|
5112
|
-
const
|
|
5136
|
+
const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5113
5137
|
__proto__: null,
|
|
5114
|
-
down:
|
|
5115
|
-
up:
|
|
5138
|
+
down: Al,
|
|
5139
|
+
up: Dl
|
|
5116
5140
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5117
|
-
async function
|
|
5141
|
+
async function Fl(e) {
|
|
5118
5142
|
await e.schema.createTable("clients").addColumn("client_id", "varchar(191)", (t) => t.notNull()).addColumn(
|
|
5119
5143
|
"tenant_id",
|
|
5120
5144
|
"varchar(191)",
|
|
@@ -5156,13 +5180,13 @@ async function jl(e) {
|
|
|
5156
5180
|
"client_id"
|
|
5157
5181
|
]).execute();
|
|
5158
5182
|
}
|
|
5159
|
-
async function
|
|
5183
|
+
async function Rl(e) {
|
|
5160
5184
|
await e.schema.dropTable("clients").execute();
|
|
5161
5185
|
}
|
|
5162
|
-
const
|
|
5186
|
+
const Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5163
5187
|
__proto__: null,
|
|
5164
|
-
down:
|
|
5165
|
-
up:
|
|
5188
|
+
down: Rl,
|
|
5189
|
+
up: Fl
|
|
5166
5190
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5167
5191
|
async function ye(e) {
|
|
5168
5192
|
try {
|
|
@@ -5171,10 +5195,10 @@ async function ye(e) {
|
|
|
5171
5195
|
return "sqlite";
|
|
5172
5196
|
}
|
|
5173
5197
|
}
|
|
5174
|
-
async function Ml(e) {
|
|
5175
|
-
await ye(e) === "mysql" ? await Jl(e) : await Ll(e);
|
|
5176
|
-
}
|
|
5177
5198
|
async function Jl(e) {
|
|
5199
|
+
await ye(e) === "mysql" ? await Ll(e) : await Kl(e);
|
|
5200
|
+
}
|
|
5201
|
+
async function Ll(e) {
|
|
5178
5202
|
await e.transaction().execute(async (t) => {
|
|
5179
5203
|
const a = await h`
|
|
5180
5204
|
SELECT
|
|
@@ -5255,7 +5279,7 @@ async function Jl(e) {
|
|
|
5255
5279
|
FROM login_sessions_backup`.execute(t), await h`DROP TABLE sessions_backup`.execute(t), await h`DROP TABLE login_sessions_backup`.execute(t), await h`DROP TABLE refresh_tokens_backup`.execute(t);
|
|
5256
5280
|
});
|
|
5257
5281
|
}
|
|
5258
|
-
async function
|
|
5282
|
+
async function Kl(e) {
|
|
5259
5283
|
await e.transaction().execute(async (t) => {
|
|
5260
5284
|
const a = [
|
|
5261
5285
|
"sessions_backup",
|
|
@@ -5321,10 +5345,10 @@ async function Ll(e) {
|
|
|
5321
5345
|
FROM login_sessions_backup`.execute(t), await h`DROP TABLE sessions_backup`.execute(t), await h`DROP TABLE login_sessions_backup`.execute(t), await h`DROP TABLE refresh_tokens_backup`.execute(t);
|
|
5322
5346
|
});
|
|
5323
5347
|
}
|
|
5324
|
-
async function Kl(e) {
|
|
5325
|
-
await ye(e) === "mysql" ? await ql(e) : await Bl(e);
|
|
5326
|
-
}
|
|
5327
5348
|
async function ql(e) {
|
|
5349
|
+
await ye(e) === "mysql" ? await Bl(e) : await Ul(e);
|
|
5350
|
+
}
|
|
5351
|
+
async function Bl(e) {
|
|
5328
5352
|
await e.transaction().execute(async (t) => {
|
|
5329
5353
|
await h`ALTER TABLE refresh_tokens DROP FOREIGN KEY refresh_tokens_client_fk`.execute(
|
|
5330
5354
|
t
|
|
@@ -5341,7 +5365,7 @@ async function ql(e) {
|
|
|
5341
5365
|
);
|
|
5342
5366
|
});
|
|
5343
5367
|
}
|
|
5344
|
-
async function
|
|
5368
|
+
async function Ul(e) {
|
|
5345
5369
|
await e.transaction().execute(async (t) => {
|
|
5346
5370
|
await h`CREATE TABLE refresh_tokens_temp AS SELECT * FROM refresh_tokens`.execute(
|
|
5347
5371
|
t
|
|
@@ -5371,12 +5395,12 @@ async function Bl(e) {
|
|
|
5371
5395
|
FROM login_sessions_temp`.execute(t), await h`DROP TABLE login_sessions_temp`.execute(t);
|
|
5372
5396
|
});
|
|
5373
5397
|
}
|
|
5374
|
-
const
|
|
5398
|
+
const Ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5375
5399
|
__proto__: null,
|
|
5376
|
-
down:
|
|
5377
|
-
up:
|
|
5400
|
+
down: ql,
|
|
5401
|
+
up: Jl
|
|
5378
5402
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5379
|
-
async function
|
|
5403
|
+
async function Hl(e) {
|
|
5380
5404
|
await e.schema.createTable("client_grants").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn(
|
|
5381
5405
|
"tenant_id",
|
|
5382
5406
|
"varchar(191)",
|
|
@@ -5393,89 +5417,89 @@ async function Ql(e) {
|
|
|
5393
5417
|
(t) => t.onDelete("cascade")
|
|
5394
5418
|
).execute(), await e.schema.createIndex("uq_client_grants_tenant_client_audience").on("client_grants").columns(["tenant_id", "client_id", "audience"]).unique().execute(), await e.schema.createIndex("idx_client_grants_audience").on("client_grants").columns(["audience"]).execute();
|
|
5395
5419
|
}
|
|
5396
|
-
async function
|
|
5420
|
+
async function Yl(e) {
|
|
5397
5421
|
await e.schema.dropTable("client_grants").execute();
|
|
5398
5422
|
}
|
|
5399
|
-
const
|
|
5423
|
+
const Wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5400
5424
|
__proto__: null,
|
|
5401
|
-
down:
|
|
5402
|
-
up:
|
|
5425
|
+
down: Yl,
|
|
5426
|
+
up: Hl
|
|
5403
5427
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5404
|
-
async function
|
|
5428
|
+
async function Gl(e) {
|
|
5405
5429
|
await e.schema.dropTable("applications").execute();
|
|
5406
5430
|
}
|
|
5407
|
-
async function
|
|
5431
|
+
async function Vl(e) {
|
|
5408
5432
|
await e.schema.createTable("applications").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn(
|
|
5409
5433
|
"tenant_id",
|
|
5410
5434
|
"varchar(191)",
|
|
5411
5435
|
(t) => t.notNull().references("tenants.id").onDelete("cascade")
|
|
5412
5436
|
).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("client_secret", "varchar(255)").addColumn("callbacks", "text", (t) => t.defaultTo("[]")).addColumn("allowed_origins", "text", (t) => t.defaultTo("[]")).addColumn("web_origins", "text", (t) => t.defaultTo("[]")).addColumn("allowed_logout_urls", "text", (t) => t.defaultTo("[]")).addColumn("allowed_clients", "text", (t) => t.defaultTo("[]")).addColumn("disable_sign_ups", "integer", (t) => t.defaultTo(0)).addColumn("addons", "text", (t) => t.defaultTo("{}")).addColumn("client_metadata", "text", (t) => t.defaultTo("{}")).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("pk_applications", ["tenant_id", "id"]).execute(), await e.schema.createIndex("idx_applications_tenant_id").on("applications").columns(["tenant_id"]).execute();
|
|
5413
5437
|
}
|
|
5414
|
-
const
|
|
5438
|
+
const Xl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5415
5439
|
__proto__: null,
|
|
5416
|
-
down:
|
|
5417
|
-
up:
|
|
5440
|
+
down: Vl,
|
|
5441
|
+
up: Gl
|
|
5418
5442
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5419
|
-
async function
|
|
5443
|
+
async function Zl(e) {
|
|
5420
5444
|
await e.schema.createIndex("users_phone_tenant_provider_index").on("users").columns(["tenant_id", "phone_number", "provider"]).execute();
|
|
5421
5445
|
}
|
|
5422
|
-
async function
|
|
5446
|
+
async function ed(e) {
|
|
5423
5447
|
await e.schema.dropIndex("users_phone_tenant_provider_index").execute();
|
|
5424
5448
|
}
|
|
5425
|
-
const
|
|
5449
|
+
const td = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5426
5450
|
__proto__: null,
|
|
5427
|
-
down:
|
|
5428
|
-
up:
|
|
5451
|
+
down: ed,
|
|
5452
|
+
up: Zl
|
|
5429
5453
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5430
|
-
async function
|
|
5454
|
+
async function ad(e) {
|
|
5431
5455
|
await e.schema.createIndex("login_sessions_id_index").on("login_sessions").column("id").execute();
|
|
5432
5456
|
}
|
|
5433
|
-
async function
|
|
5457
|
+
async function nd(e) {
|
|
5434
5458
|
await e.schema.dropIndex("login_sessions_id_index").execute();
|
|
5435
5459
|
}
|
|
5436
|
-
const
|
|
5460
|
+
const od = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5437
5461
|
__proto__: null,
|
|
5438
|
-
down:
|
|
5439
|
-
up:
|
|
5462
|
+
down: nd,
|
|
5463
|
+
up: ad
|
|
5440
5464
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5441
|
-
async function
|
|
5465
|
+
async function rd(e) {
|
|
5442
5466
|
await e.schema.createIndex("connections_tenant_id_index").on("connections").column("tenant_id").execute();
|
|
5443
5467
|
}
|
|
5444
|
-
async function
|
|
5468
|
+
async function sd(e) {
|
|
5445
5469
|
await e.schema.dropIndex("connections_tenant_id_index").execute();
|
|
5446
5470
|
}
|
|
5447
|
-
const
|
|
5471
|
+
const id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5448
5472
|
__proto__: null,
|
|
5449
|
-
down:
|
|
5450
|
-
up:
|
|
5473
|
+
down: sd,
|
|
5474
|
+
up: rd
|
|
5451
5475
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5452
|
-
async function
|
|
5476
|
+
async function cd(e) {
|
|
5453
5477
|
await e.schema.dropIndex("idx_user_organizations_tenant_id").execute();
|
|
5454
5478
|
}
|
|
5455
|
-
async function
|
|
5479
|
+
async function ld(e) {
|
|
5456
5480
|
await e.schema.createIndex("idx_user_organizations_tenant_id").on("user_organizations").column("tenant_id").execute();
|
|
5457
5481
|
}
|
|
5458
|
-
const
|
|
5482
|
+
const dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5459
5483
|
__proto__: null,
|
|
5460
|
-
down:
|
|
5461
|
-
up:
|
|
5484
|
+
down: ld,
|
|
5485
|
+
up: cd
|
|
5462
5486
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5463
|
-
async function
|
|
5487
|
+
async function ud(e) {
|
|
5464
5488
|
await e.schema.createTable("tenant_settings").addColumn(
|
|
5465
5489
|
"tenant_id",
|
|
5466
5490
|
"varchar(191)",
|
|
5467
5491
|
(t) => t.references("tenants.id").onDelete("cascade").notNull().primaryKey()
|
|
5468
5492
|
).addColumn("idle_session_lifetime", "integer").addColumn("session_lifetime", "integer").addColumn("session_cookie", "text").addColumn("enable_client_connections", "integer").addColumn("default_redirection_uri", "text").addColumn("enabled_locales", "text").addColumn("default_directory", "varchar(255)").addColumn("error_page", "text").addColumn("flags", "text").addColumn("friendly_name", "varchar(255)").addColumn("picture_url", "text").addColumn("support_email", "varchar(255)").addColumn("support_url", "text").addColumn("sandbox_version", "varchar(50)").addColumn("sandbox_versions_available", "text").addColumn("change_password", "text").addColumn("guardian_mfa_page", "text").addColumn("default_audience", "varchar(255)").addColumn("default_organization", "varchar(255)").addColumn("sessions", "text").execute();
|
|
5469
5493
|
}
|
|
5470
|
-
async function
|
|
5494
|
+
async function _d(e) {
|
|
5471
5495
|
await e.schema.dropTable("tenant_settings").execute();
|
|
5472
5496
|
}
|
|
5473
|
-
const
|
|
5497
|
+
const md = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5474
5498
|
__proto__: null,
|
|
5475
|
-
down:
|
|
5476
|
-
up:
|
|
5499
|
+
down: _d,
|
|
5500
|
+
up: ud
|
|
5477
5501
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5478
|
-
async function
|
|
5502
|
+
async function hd(e) {
|
|
5479
5503
|
if (await e.schema.alterTable("tenants").addColumn("idle_session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("session_cookie", "text").execute(), await e.schema.alterTable("tenants").addColumn("allowed_logout_urls", "text").execute(), await e.schema.alterTable("tenants").addColumn("ephemeral_session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("idle_ephemeral_session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("default_redirection_uri", "text").execute(), await e.schema.alterTable("tenants").addColumn("enabled_locales", "text").execute(), await e.schema.alterTable("tenants").addColumn("default_directory", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("error_page", "text").execute(), await e.schema.alterTable("tenants").addColumn("flags", "text").execute(), await e.schema.alterTable("tenants").addColumn("friendly_name", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("picture_url", "text").execute(), await e.schema.alterTable("tenants").addColumn("support_email", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("sandbox_version", "varchar(50)").execute(), await e.schema.alterTable("tenants").addColumn("sandbox_versions_available", "text").execute(), await e.schema.alterTable("tenants").addColumn("legacy_sandbox_version", "varchar(50)").execute(), await e.schema.alterTable("tenants").addColumn("change_password", "text").execute(), await e.schema.alterTable("tenants").addColumn("guardian_mfa_page", "text").execute(), await e.schema.alterTable("tenants").addColumn("device_flow", "text").execute(), await e.schema.alterTable("tenants").addColumn("default_token_quota", "text").execute(), await e.schema.alterTable("tenants").addColumn("default_audience", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("default_organization", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("sessions", "text").execute(), await e.schema.alterTable("tenants").addColumn("oidc_logout", "text").execute(), await e.schema.alterTable("tenants").addColumn("allow_organization_name_in_authentication_api", "integer").execute(), await e.schema.alterTable("tenants").addColumn("customize_mfa_in_postlogin_action", "integer").execute(), await e.schema.alterTable("tenants").addColumn("acr_values_supported", "text").execute(), await e.schema.alterTable("tenants").addColumn("mtls", "text").execute(), await e.schema.alterTable("tenants").addColumn("pushed_authorization_requests_supported", "integer").execute(), await e.schema.alterTable("tenants").addColumn("authorization_response_iss_parameter_supported", "integer").execute(), await e.updateTable("tenants").set({
|
|
5480
5504
|
friendly_name: h`name`
|
|
5481
5505
|
}).execute(), await e.schema.alterTable("tenants").dropColumn("language").execute(), await e.schema.alterTable("tenants").dropColumn("logo").execute(), await e.schema.alterTable("tenants").dropColumn("primary_color").execute(), await e.schema.alterTable("tenants").dropColumn("secondary_color").execute(), await e.schema.alterTable("tenants").dropColumn("name").execute(), (await e.selectFrom("tenant_settings").select("tenant_id").limit(1).execute()).length > 0) {
|
|
@@ -5506,7 +5530,7 @@ async function md(e) {
|
|
|
5506
5530
|
}
|
|
5507
5531
|
await e.schema.dropTable("tenant_settings").execute();
|
|
5508
5532
|
}
|
|
5509
|
-
async function
|
|
5533
|
+
async function pd(e) {
|
|
5510
5534
|
await e.schema.createTable("tenant_settings").addColumn(
|
|
5511
5535
|
"tenant_id",
|
|
5512
5536
|
"varchar(191)",
|
|
@@ -5563,45 +5587,45 @@ async function hd(e) {
|
|
|
5563
5587
|
name: h`COALESCE(friendly_name, id)`
|
|
5564
5588
|
}).execute(), await e.schema.alterTable("tenants").addColumn("language", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("logo", "text").execute(), await e.schema.alterTable("tenants").addColumn("primary_color", "varchar(50)").execute(), await e.schema.alterTable("tenants").addColumn("secondary_color", "varchar(50)").execute();
|
|
5565
5589
|
}
|
|
5566
|
-
const
|
|
5590
|
+
const fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5567
5591
|
__proto__: null,
|
|
5568
|
-
down:
|
|
5569
|
-
up:
|
|
5592
|
+
down: pd,
|
|
5593
|
+
up: hd
|
|
5570
5594
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5571
|
-
async function
|
|
5595
|
+
async function gd(e) {
|
|
5572
5596
|
await e.schema.createTable("invites").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("organization_id", "varchar(21)", (t) => t.notNull()).addColumn("inviter", "text", (t) => t.notNull()).addColumn("invitee", "text", (t) => t.notNull()).addColumn("client_id", "varchar(191)", (t) => t.notNull()).addColumn("connection_id", "varchar(21)").addColumn("invitation_url", "text", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)", (t) => t.notNull()).addColumn("app_metadata", "text").addColumn("user_metadata", "text").addColumn("roles", "text").addColumn("ticket_id", "varchar(191)").addColumn("ttl_sec", "integer").addColumn("send_invitation_email", "integer").execute(), await e.schema.createIndex("idx_invites_tenant_id").on("invites").column("tenant_id").execute(), await e.schema.createIndex("idx_invites_organization_id").on("invites").column("organization_id").execute(), await e.schema.createIndex("idx_invites_expires_at").on("invites").column("expires_at").execute(), await e.schema.createIndex("idx_invites_tenant_created").on("invites").columns(["tenant_id", "created_at"]).execute();
|
|
5573
5597
|
}
|
|
5574
|
-
async function
|
|
5598
|
+
async function wd(e) {
|
|
5575
5599
|
await e.schema.dropTable("invites").execute();
|
|
5576
5600
|
}
|
|
5577
|
-
const
|
|
5601
|
+
const yd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5578
5602
|
__proto__: null,
|
|
5579
|
-
down:
|
|
5580
|
-
up:
|
|
5603
|
+
down: wd,
|
|
5604
|
+
up: gd
|
|
5581
5605
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5582
|
-
async function
|
|
5606
|
+
async function vd(e) {
|
|
5583
5607
|
await e.schema.dropTable("logs").ifExists().execute(), await e.schema.createTable("logs").addColumn("log_id", "varchar(21)", (t) => t.primaryKey().notNull()).addColumn("category", "varchar(255)").addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (t) => t.notNull()).addColumn("date", "varchar(25)", (t) => t.notNull()).addColumn("client_id", "varchar(255)").addColumn("client_name", "varchar(255)").addColumn("user_agent", "varchar(255)").addColumn("description", "varchar(255)").addColumn("details", "varchar(2048)").addColumn("isMobile", "integer").addColumn("user_name", "varchar(255)").addColumn("connection", "varchar(255)").addColumn("connection_id", "varchar(255)").addColumn("audience", "varchar(255)").addColumn("scope", "varchar(255)").addColumn("strategy", "varchar(255)").addColumn("strategy_type", "varchar(255)").addColumn("hostname", "varchar(255)").addColumn("auth0_client", "varchar(8192)").addColumn("session_connection", "varchar(255)").execute();
|
|
5584
5608
|
}
|
|
5585
|
-
async function
|
|
5609
|
+
async function Cd(e) {
|
|
5586
5610
|
await e.schema.dropTable("logs").ifExists().execute(), await e.schema.createTable("logs").addColumn("id", "varchar(255)", (t) => t.primaryKey().notNull()).addColumn("category", "varchar(255)", (t) => t.notNull()).addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (t) => t.notNull()).addColumn("date", "varchar(25)", (t) => t.notNull()).addColumn("client_id", "varchar(255)").addColumn("client_name", "varchar(255)").addColumn("user_agent", "varchar(255)").addColumn("description", "varchar(255)").addColumn("details", "varchar(2048)").execute();
|
|
5587
5611
|
}
|
|
5588
|
-
const
|
|
5612
|
+
const xd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5589
5613
|
__proto__: null,
|
|
5590
|
-
down:
|
|
5591
|
-
up:
|
|
5614
|
+
down: Cd,
|
|
5615
|
+
up: vd
|
|
5592
5616
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5593
|
-
async function
|
|
5617
|
+
async function Td(e) {
|
|
5594
5618
|
await e.schema.alterTable("logs").addColumn("country_code", "varchar(2)").execute(), await e.schema.alterTable("logs").addColumn("city_name", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("latitude", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("longitude", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("time_zone", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("continent_code", "varchar(2)").execute();
|
|
5595
5619
|
}
|
|
5596
|
-
async function
|
|
5620
|
+
async function Nd(e) {
|
|
5597
5621
|
await e.schema.alterTable("logs").dropColumn("country_code").execute(), await e.schema.alterTable("logs").dropColumn("city_name").execute(), await e.schema.alterTable("logs").dropColumn("latitude").execute(), await e.schema.alterTable("logs").dropColumn("longitude").execute(), await e.schema.alterTable("logs").dropColumn("time_zone").execute(), await e.schema.alterTable("logs").dropColumn("continent_code").execute();
|
|
5598
5622
|
}
|
|
5599
|
-
const
|
|
5623
|
+
const bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5600
5624
|
__proto__: null,
|
|
5601
|
-
down:
|
|
5602
|
-
up:
|
|
5603
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5604
|
-
async function
|
|
5625
|
+
down: Nd,
|
|
5626
|
+
up: Td
|
|
5627
|
+
}, Symbol.toStringTag, { value: "Module" })), F = 1e3;
|
|
5628
|
+
async function Sd(e) {
|
|
5605
5629
|
await e.schema.createTable("password_history").addColumn("id", "varchar(21)", (n) => n.primaryKey()).addColumn("user_id", "varchar(191)", (n) => n.notNull()).addColumn(
|
|
5606
5630
|
"tenant_id",
|
|
5607
5631
|
"varchar(191)",
|
|
@@ -5626,7 +5650,7 @@ async function bd(e) {
|
|
|
5626
5650
|
"algorithm",
|
|
5627
5651
|
"created_at",
|
|
5628
5652
|
"updated_at"
|
|
5629
|
-
]).limit(
|
|
5653
|
+
]).limit(F).offset(t).execute();
|
|
5630
5654
|
if (n.length === 0) {
|
|
5631
5655
|
a = !1;
|
|
5632
5656
|
break;
|
|
@@ -5642,11 +5666,11 @@ async function bd(e) {
|
|
|
5642
5666
|
updated_at: o.updated_at ?? o.created_at,
|
|
5643
5667
|
is_current: 1
|
|
5644
5668
|
}).execute();
|
|
5645
|
-
t +=
|
|
5669
|
+
t += F, n.length < F && (a = !1);
|
|
5646
5670
|
}
|
|
5647
5671
|
await e.schema.alterTable("passwords").renameTo("passwords_backup").execute(), await e.schema.alterTable("password_history").renameTo("passwords").execute();
|
|
5648
5672
|
}
|
|
5649
|
-
async function
|
|
5673
|
+
async function Od(e) {
|
|
5650
5674
|
await e.schema.alterTable("passwords").renameTo("password_history").execute();
|
|
5651
5675
|
try {
|
|
5652
5676
|
await e.schema.alterTable("passwords_backup").renameTo("passwords").execute();
|
|
@@ -5675,7 +5699,7 @@ async function Sd(e) {
|
|
|
5675
5699
|
"algorithm",
|
|
5676
5700
|
"created_at",
|
|
5677
5701
|
"updated_at"
|
|
5678
|
-
]).where("is_current", "=", 1).limit(
|
|
5702
|
+
]).where("is_current", "=", 1).limit(F).offset(t).execute();
|
|
5679
5703
|
if (n.length === 0) {
|
|
5680
5704
|
a = !1;
|
|
5681
5705
|
break;
|
|
@@ -5689,61 +5713,61 @@ async function Sd(e) {
|
|
|
5689
5713
|
created_at: o.created_at,
|
|
5690
5714
|
updated_at: o.updated_at
|
|
5691
5715
|
}).execute();
|
|
5692
|
-
t +=
|
|
5716
|
+
t += F, n.length < F && (a = !1);
|
|
5693
5717
|
}
|
|
5694
5718
|
}
|
|
5695
5719
|
await e.schema.dropTable("password_history").execute();
|
|
5696
5720
|
}
|
|
5697
|
-
const
|
|
5721
|
+
const kd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5698
5722
|
__proto__: null,
|
|
5699
|
-
down:
|
|
5700
|
-
up:
|
|
5723
|
+
down: Od,
|
|
5724
|
+
up: Sd
|
|
5701
5725
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5702
|
-
async function
|
|
5726
|
+
async function $d(e) {
|
|
5703
5727
|
await e.schema.alterTable("connections").addColumn("display_name", "varchar(255)").execute(), await e.schema.alterTable("connections").addColumn("is_domain_connection", "integer").execute(), await e.schema.alterTable("connections").addColumn("show_as_button", "integer").execute(), await e.schema.alterTable("connections").addColumn("metadata", "varchar(4096)").execute();
|
|
5704
5728
|
}
|
|
5705
|
-
async function
|
|
5729
|
+
async function Ed(e) {
|
|
5706
5730
|
await e.schema.alterTable("connections").dropColumn("display_name").execute(), await e.schema.alterTable("connections").dropColumn("is_domain_connection").execute(), await e.schema.alterTable("connections").dropColumn("show_as_button").execute(), await e.schema.alterTable("connections").dropColumn("metadata").execute();
|
|
5707
5731
|
}
|
|
5708
|
-
const
|
|
5732
|
+
const Id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5709
5733
|
__proto__: null,
|
|
5710
|
-
down:
|
|
5711
|
-
up:
|
|
5734
|
+
down: Ed,
|
|
5735
|
+
up: $d
|
|
5712
5736
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5713
|
-
async function
|
|
5737
|
+
async function zd(e) {
|
|
5714
5738
|
await e.schema.alterTable("clients").addColumn("connections", "text", (t) => t.notNull().defaultTo("[]")).execute();
|
|
5715
5739
|
}
|
|
5716
|
-
async function
|
|
5740
|
+
async function Pd(e) {
|
|
5717
5741
|
await e.schema.alterTable("clients").dropColumn("connections").execute();
|
|
5718
5742
|
}
|
|
5719
|
-
const
|
|
5743
|
+
const Dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5720
5744
|
__proto__: null,
|
|
5721
|
-
down:
|
|
5722
|
-
up:
|
|
5745
|
+
down: Pd,
|
|
5746
|
+
up: zd
|
|
5723
5747
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5724
|
-
async function
|
|
5748
|
+
async function Ad(e) {
|
|
5725
5749
|
await e.schema.createTable("flows").addColumn("id", "varchar(24)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(150)", (t) => t.notNull()).addColumn("actions", "text").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute(), await e.schema.createIndex("flows_tenant_id_idx").on("flows").column("tenant_id").execute(), await e.schema.dropTable("passwords_backup").execute();
|
|
5726
5750
|
}
|
|
5727
|
-
async function
|
|
5751
|
+
async function jd(e) {
|
|
5728
5752
|
await e.schema.dropTable("flows").execute();
|
|
5729
5753
|
}
|
|
5730
|
-
const
|
|
5754
|
+
const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5731
5755
|
__proto__: null,
|
|
5732
|
-
down:
|
|
5733
|
-
up:
|
|
5756
|
+
down: jd,
|
|
5757
|
+
up: Ad
|
|
5734
5758
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5735
|
-
async function
|
|
5759
|
+
async function Rd(e) {
|
|
5736
5760
|
await e.schema.alterTable("resource_servers").addColumn("is_system", "integer", (t) => t.defaultTo(0).notNull()).execute(), await e.schema.alterTable("roles").addColumn("is_system", "integer", (t) => t.defaultTo(0).notNull()).execute(), await e.schema.alterTable("connections").addColumn("is_system", "integer", (t) => t.defaultTo(0).notNull()).execute();
|
|
5737
5761
|
}
|
|
5738
|
-
async function
|
|
5762
|
+
async function Md(e) {
|
|
5739
5763
|
await e.schema.alterTable("resource_servers").dropColumn("is_system").execute(), await e.schema.alterTable("roles").dropColumn("is_system").execute(), await e.schema.alterTable("connections").dropColumn("is_system").execute();
|
|
5740
5764
|
}
|
|
5741
|
-
const
|
|
5765
|
+
const Jd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5742
5766
|
__proto__: null,
|
|
5743
|
-
down:
|
|
5744
|
-
up:
|
|
5767
|
+
down: Md,
|
|
5768
|
+
up: Rd
|
|
5745
5769
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5746
|
-
async function
|
|
5770
|
+
async function Ld(e) {
|
|
5747
5771
|
const t = await e.selectFrom("keys").selectAll().execute();
|
|
5748
5772
|
await e.schema.dropTable("keys").execute(), await h`ALTER TABLE connections RENAME TO connections_old`.execute(e), await e.schema.createTable("connections").addColumn("id", "varchar(255)", (a) => a.notNull()).addColumn(
|
|
5749
5773
|
"tenant_id",
|
|
@@ -5776,7 +5800,7 @@ async function Jd(e) {
|
|
|
5776
5800
|
for (const a of t)
|
|
5777
5801
|
await e.insertInto("keys").values(a).execute();
|
|
5778
5802
|
}
|
|
5779
|
-
async function
|
|
5803
|
+
async function Kd(e) {
|
|
5780
5804
|
const t = await e.selectFrom("keys").selectAll().execute();
|
|
5781
5805
|
await e.schema.dropTable("keys").execute(), await h`ALTER TABLE connections RENAME TO connections_new`.execute(e), await e.schema.createTable("connections").addColumn("id", "varchar(255)", (a) => a.notNull().primaryKey()).addColumn(
|
|
5782
5806
|
"tenant_id",
|
|
@@ -5813,12 +5837,12 @@ async function Ld(e) {
|
|
|
5813
5837
|
for (const a of t)
|
|
5814
5838
|
await e.insertInto("keys").values(a).execute();
|
|
5815
5839
|
}
|
|
5816
|
-
const
|
|
5840
|
+
const qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5817
5841
|
__proto__: null,
|
|
5818
|
-
down:
|
|
5819
|
-
up:
|
|
5842
|
+
down: Kd,
|
|
5843
|
+
up: Ld
|
|
5820
5844
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5821
|
-
async function
|
|
5845
|
+
async function Bd(e) {
|
|
5822
5846
|
await e.schema.alterTable("login_sessions").addColumn("state", "varchar(50)", (t) => t.defaultTo("pending")).execute(), await e.schema.alterTable("login_sessions").addColumn("state_data", "text").execute(), await e.schema.alterTable("login_sessions").addColumn("failure_reason", "text").execute(), await e.schema.alterTable("login_sessions").addColumn("user_id", "varchar(255)").execute(), await e.schema.createIndex("login_sessions_tenant_user_idx").on("login_sessions").columns(["tenant_id", "user_id"]).execute(), await e.updateTable("login_sessions").set({
|
|
5823
5847
|
state: h`CASE
|
|
5824
5848
|
WHEN login_completed = 1 THEN 'completed'
|
|
@@ -5827,28 +5851,28 @@ async function qd(e) {
|
|
|
5827
5851
|
END`
|
|
5828
5852
|
}).execute(), await e.schema.alterTable("login_sessions").dropColumn("login_completed").execute(), await e.schema.createIndex("login_sessions_state_idx").on("login_sessions").column("state").execute(), await e.schema.createIndex("login_sessions_state_updated_idx").on("login_sessions").columns(["state", "updated_at"]).execute();
|
|
5829
5853
|
}
|
|
5830
|
-
async function
|
|
5854
|
+
async function Ud(e) {
|
|
5831
5855
|
await e.schema.alterTable("login_sessions").addColumn("login_completed", "integer", (t) => t.defaultTo(0)).execute(), await e.updateTable("login_sessions").set({
|
|
5832
5856
|
login_completed: h`CASE WHEN state = 'completed' THEN 1 ELSE 0 END`
|
|
5833
5857
|
}).execute(), await e.schema.dropIndex("login_sessions_state_updated_idx").execute(), await e.schema.dropIndex("login_sessions_state_idx").execute(), await e.schema.dropIndex("login_sessions_tenant_user_idx").execute(), await e.schema.alterTable("login_sessions").dropColumn("state").dropColumn("state_data").dropColumn("failure_reason").dropColumn("user_id").execute();
|
|
5834
5858
|
}
|
|
5835
|
-
const
|
|
5859
|
+
const Qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5836
5860
|
__proto__: null,
|
|
5837
|
-
down:
|
|
5838
|
-
up:
|
|
5861
|
+
down: Ud,
|
|
5862
|
+
up: Bd
|
|
5839
5863
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5840
|
-
async function
|
|
5864
|
+
async function Hd(e) {
|
|
5841
5865
|
await e.schema.alterTable("roles").addColumn("metadata", "varchar(4096)").execute(), await e.schema.alterTable("resource_servers").addColumn("metadata", "varchar(4096)").execute();
|
|
5842
5866
|
}
|
|
5843
|
-
async function
|
|
5867
|
+
async function Yd(e) {
|
|
5844
5868
|
await e.schema.alterTable("roles").dropColumn("metadata").execute(), await e.schema.alterTable("resource_servers").dropColumn("metadata").execute();
|
|
5845
5869
|
}
|
|
5846
|
-
const
|
|
5870
|
+
const Wd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5847
5871
|
__proto__: null,
|
|
5848
|
-
down:
|
|
5849
|
-
up:
|
|
5872
|
+
down: Yd,
|
|
5873
|
+
up: Hd
|
|
5850
5874
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5851
|
-
async function
|
|
5875
|
+
async function Gd(e) {
|
|
5852
5876
|
try {
|
|
5853
5877
|
return await h`SELECT VERSION()`.execute(e), "mysql";
|
|
5854
5878
|
} catch {
|
|
@@ -5868,11 +5892,11 @@ async function x(e, t, a, n) {
|
|
|
5868
5892
|
throw o;
|
|
5869
5893
|
}
|
|
5870
5894
|
}
|
|
5871
|
-
async function
|
|
5872
|
-
const t = await
|
|
5895
|
+
async function Vd(e) {
|
|
5896
|
+
const t = await Gd(e);
|
|
5873
5897
|
await x(e, "refresh_tokens", "created_at_ts", "bigint"), await x(e, "refresh_tokens", "expires_at_ts", "bigint"), await x(e, "refresh_tokens", "idle_expires_at_ts", "bigint"), await x(e, "refresh_tokens", "last_exchanged_at_ts", "bigint"), await x(e, "sessions", "created_at_ts", "bigint"), await x(e, "sessions", "updated_at_ts", "bigint"), await x(e, "sessions", "expires_at_ts", "bigint"), await x(e, "sessions", "idle_expires_at_ts", "bigint"), await x(e, "sessions", "authenticated_at_ts", "bigint"), await x(e, "sessions", "last_interaction_at_ts", "bigint"), await x(e, "sessions", "used_at_ts", "bigint"), await x(e, "sessions", "revoked_at_ts", "bigint"), await x(e, "login_sessions", "created_at_ts", "bigint"), await x(e, "login_sessions", "updated_at_ts", "bigint"), await x(e, "login_sessions", "expires_at_ts", "bigint"), t === "mysql" && (await e.schema.alterTable("refresh_tokens").modifyColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").modifyColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").modifyColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").modifyColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("expires_at", "varchar(35)").execute()), await e.schema.createIndex("idx_sessions_user_id").on("sessions").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("idx_refresh_tokens_user_id").on("refresh_tokens").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("idx_refresh_tokens_session_id").on("refresh_tokens").column("session_id").execute(), await e.schema.createIndex("idx_refresh_tokens_expires_at_ts").on("refresh_tokens").column("expires_at_ts").execute(), await e.schema.createIndex("idx_sessions_expires_at_ts").on("sessions").column("expires_at_ts").execute(), await e.schema.createIndex("idx_login_sessions_expires_at_ts").on("login_sessions").column("expires_at_ts").execute();
|
|
5874
5898
|
}
|
|
5875
|
-
async function
|
|
5899
|
+
async function j(e, t, a) {
|
|
5876
5900
|
try {
|
|
5877
5901
|
await e.schema.dropIndex(t).on(a).execute();
|
|
5878
5902
|
} catch (n) {
|
|
@@ -5890,13 +5914,13 @@ async function T(e, t, a) {
|
|
|
5890
5914
|
throw n;
|
|
5891
5915
|
}
|
|
5892
5916
|
}
|
|
5893
|
-
async function
|
|
5894
|
-
await
|
|
5917
|
+
async function Xd(e) {
|
|
5918
|
+
await j(e, "idx_sessions_user_id", "sessions"), await j(e, "idx_refresh_tokens_user_id", "refresh_tokens"), await j(e, "idx_refresh_tokens_session_id", "refresh_tokens"), await j(e, "idx_refresh_tokens_expires_at_ts", "refresh_tokens"), await j(e, "idx_sessions_expires_at_ts", "sessions"), await j(e, "idx_login_sessions_expires_at_ts", "login_sessions"), await T(e, "refresh_tokens", "created_at_ts"), await T(e, "refresh_tokens", "expires_at_ts"), await T(e, "refresh_tokens", "idle_expires_at_ts"), await T(e, "refresh_tokens", "last_exchanged_at_ts"), await T(e, "sessions", "created_at_ts"), await T(e, "sessions", "updated_at_ts"), await T(e, "sessions", "expires_at_ts"), await T(e, "sessions", "idle_expires_at_ts"), await T(e, "sessions", "authenticated_at_ts"), await T(e, "sessions", "last_interaction_at_ts"), await T(e, "sessions", "used_at_ts"), await T(e, "sessions", "revoked_at_ts"), await T(e, "login_sessions", "created_at_ts"), await T(e, "login_sessions", "updated_at_ts"), await T(e, "login_sessions", "expires_at_ts");
|
|
5895
5919
|
}
|
|
5896
|
-
const
|
|
5920
|
+
const Zd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5897
5921
|
__proto__: null,
|
|
5898
|
-
down:
|
|
5899
|
-
up:
|
|
5922
|
+
down: Xd,
|
|
5923
|
+
up: Vd
|
|
5900
5924
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5901
5925
|
async function ve(e) {
|
|
5902
5926
|
try {
|
|
@@ -5919,7 +5943,7 @@ async function N(e, t, a) {
|
|
|
5919
5943
|
throw n;
|
|
5920
5944
|
}
|
|
5921
5945
|
}
|
|
5922
|
-
async function
|
|
5946
|
+
async function eu(e) {
|
|
5923
5947
|
const t = await ve(e);
|
|
5924
5948
|
console.log("Dropping indexes that depend on old date columns...");
|
|
5925
5949
|
try {
|
|
@@ -5933,48 +5957,48 @@ async function Zd(e) {
|
|
|
5933
5957
|
}
|
|
5934
5958
|
console.log("Dropping old date columns..."), await N(e, "refresh_tokens", "created_at"), await N(e, "refresh_tokens", "expires_at"), await N(e, "refresh_tokens", "idle_expires_at"), await N(e, "refresh_tokens", "last_exchanged_at"), await N(e, "sessions", "created_at"), await N(e, "sessions", "updated_at"), await N(e, "sessions", "expires_at"), await N(e, "sessions", "idle_expires_at"), await N(e, "sessions", "authenticated_at"), await N(e, "sessions", "last_interaction_at"), await N(e, "sessions", "used_at"), await N(e, "sessions", "revoked_at"), await N(e, "login_sessions", "created_at"), await N(e, "login_sessions", "updated_at"), await N(e, "login_sessions", "expires_at"), t === "mysql" && (console.log("Increasing ID column sizes for ULID support..."), await e.schema.alterTable("login_sessions").modifyColumn("id", "varchar(26)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("session_id", "varchar(26)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("csrf_token", "varchar(26)").execute(), await e.schema.alterTable("sessions").modifyColumn("id", "varchar(26)").execute(), await e.schema.alterTable("sessions").modifyColumn("login_session_id", "varchar(26)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("id", "varchar(26)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("session_id", "varchar(26)").execute()), console.log("Migration completed successfully");
|
|
5935
5959
|
}
|
|
5936
|
-
async function
|
|
5960
|
+
async function tu(e) {
|
|
5937
5961
|
await ve(e) === "mysql" && (console.log("Restoring ID column sizes to varchar(21)..."), await e.schema.alterTable("login_sessions").modifyColumn("id", "varchar(21)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("session_id", "varchar(21)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("csrf_token", "varchar(21)").execute(), await e.schema.alterTable("sessions").modifyColumn("id", "varchar(21)").execute(), await e.schema.alterTable("sessions").modifyColumn("login_session_id", "varchar(21)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("id", "varchar(21)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("session_id", "varchar(21)").execute()), console.log("Re-adding old date columns (data will be empty)..."), await e.schema.alterTable("refresh_tokens").addColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").addColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").addColumn("idle_expires_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").addColumn("last_exchanged_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("idle_expires_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("authenticated_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("last_interaction_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("used_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("revoked_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").addColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").addColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").addColumn("expires_at", "varchar(35)").execute(), console.log("Rollback completed");
|
|
5938
5962
|
}
|
|
5939
|
-
const
|
|
5963
|
+
const au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5940
5964
|
__proto__: null,
|
|
5941
|
-
down:
|
|
5942
|
-
up:
|
|
5965
|
+
down: tu,
|
|
5966
|
+
up: eu
|
|
5943
5967
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5944
|
-
async function
|
|
5968
|
+
async function nu(e) {
|
|
5945
5969
|
await e.schema.alterTable("users").dropColumn("user_metadata").execute(), await e.schema.alterTable("users").addColumn("user_metadata", "text").execute(), await e.schema.alterTable("users").addColumn("middle_name", "varchar(100)").execute(), await e.schema.alterTable("users").addColumn("profile", "text").execute(), await e.schema.alterTable("users").addColumn("website", "text").execute(), await e.schema.alterTable("users").addColumn("gender", "varchar(50)").execute(), await e.schema.alterTable("users").addColumn("birthdate", "varchar(10)").execute(), await e.schema.alterTable("users").addColumn("zoneinfo", "varchar(100)").execute();
|
|
5946
5970
|
}
|
|
5947
|
-
async function
|
|
5971
|
+
async function ou(e) {
|
|
5948
5972
|
await e.schema.alterTable("users").dropColumn("middle_name").execute(), await e.schema.alterTable("users").dropColumn("profile").execute(), await e.schema.alterTable("users").dropColumn("website").execute(), await e.schema.alterTable("users").dropColumn("gender").execute(), await e.schema.alterTable("users").dropColumn("birthdate").execute(), await e.schema.alterTable("users").dropColumn("zoneinfo").execute(), await e.schema.alterTable("users").dropColumn("user_metadata").execute(), await e.schema.alterTable("users").addColumn("user_metadata", "varchar(4096)").execute();
|
|
5949
5973
|
}
|
|
5950
|
-
const
|
|
5974
|
+
const ru = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5951
5975
|
__proto__: null,
|
|
5952
|
-
down:
|
|
5953
|
-
up:
|
|
5976
|
+
down: ou,
|
|
5977
|
+
up: nu
|
|
5954
5978
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5955
|
-
async function
|
|
5979
|
+
async function su(e) {
|
|
5956
5980
|
await e.schema.alterTable("users").addColumn("preferred_username", "varchar(255)").execute();
|
|
5957
5981
|
}
|
|
5958
|
-
async function
|
|
5982
|
+
async function iu(e) {
|
|
5959
5983
|
await e.schema.alterTable("users").dropColumn("preferred_username").execute();
|
|
5960
5984
|
}
|
|
5961
|
-
const
|
|
5985
|
+
const cu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5962
5986
|
__proto__: null,
|
|
5963
|
-
down:
|
|
5964
|
-
up:
|
|
5987
|
+
down: iu,
|
|
5988
|
+
up: su
|
|
5965
5989
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5966
|
-
async function
|
|
5990
|
+
async function lu(e) {
|
|
5967
5991
|
await e.schema.alterTable("users").addColumn("address", "text").execute();
|
|
5968
5992
|
}
|
|
5969
|
-
async function
|
|
5993
|
+
async function du(e) {
|
|
5970
5994
|
await e.schema.alterTable("users").dropColumn("address").execute();
|
|
5971
5995
|
}
|
|
5972
|
-
const
|
|
5996
|
+
const uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5973
5997
|
__proto__: null,
|
|
5974
|
-
down:
|
|
5975
|
-
up:
|
|
5998
|
+
down: du,
|
|
5999
|
+
up: lu
|
|
5976
6000
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5977
|
-
async function
|
|
6001
|
+
async function _u(e) {
|
|
5978
6002
|
try {
|
|
5979
6003
|
await e.schema.alterTable("login_sessions").addColumn("authParams_max_age", "integer").execute(), console.log(" Added column authParams_max_age to login_sessions");
|
|
5980
6004
|
} catch (t) {
|
|
@@ -5990,7 +6014,7 @@ async function uu(e) {
|
|
|
5990
6014
|
);
|
|
5991
6015
|
}
|
|
5992
6016
|
}
|
|
5993
|
-
async function
|
|
6017
|
+
async function mu(e) {
|
|
5994
6018
|
try {
|
|
5995
6019
|
await e.schema.alterTable("login_sessions").dropColumn("authParams_max_age").execute();
|
|
5996
6020
|
} catch (t) {
|
|
@@ -6006,38 +6030,38 @@ async function _u(e) {
|
|
|
6006
6030
|
);
|
|
6007
6031
|
}
|
|
6008
6032
|
}
|
|
6009
|
-
const
|
|
6033
|
+
const hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6010
6034
|
__proto__: null,
|
|
6011
|
-
down:
|
|
6012
|
-
up:
|
|
6035
|
+
down: mu,
|
|
6036
|
+
up: _u
|
|
6013
6037
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6014
|
-
async function
|
|
6038
|
+
async function pu(e) {
|
|
6015
6039
|
await e.schema.alterTable("clients").addColumn("auth0_conformant", "integer", (t) => t.defaultTo(1)).execute();
|
|
6016
6040
|
}
|
|
6017
|
-
async function
|
|
6041
|
+
async function fu(e) {
|
|
6018
6042
|
await e.schema.alterTable("clients").dropColumn("auth0_conformant").execute();
|
|
6019
6043
|
}
|
|
6020
|
-
const
|
|
6044
|
+
const gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6021
6045
|
__proto__: null,
|
|
6022
|
-
down:
|
|
6023
|
-
up:
|
|
6046
|
+
down: fu,
|
|
6047
|
+
up: pu
|
|
6024
6048
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6025
|
-
async function
|
|
6049
|
+
async function wu(e) {
|
|
6026
6050
|
await e.schema.createTable("universal_login_templates").addColumn(
|
|
6027
6051
|
"tenant_id",
|
|
6028
6052
|
"varchar(191)",
|
|
6029
6053
|
(t) => t.primaryKey().references("tenants.id").onDelete("cascade")
|
|
6030
6054
|
).addColumn("body", "text", (t) => t.notNull()).addColumn("updated_at_ts", "integer", (t) => t.notNull()).addColumn("created_at_ts", "integer", (t) => t.notNull()).execute();
|
|
6031
6055
|
}
|
|
6032
|
-
async function
|
|
6056
|
+
async function yu(e) {
|
|
6033
6057
|
await e.schema.dropTable("universal_login_templates").execute();
|
|
6034
6058
|
}
|
|
6035
|
-
const
|
|
6059
|
+
const vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6036
6060
|
__proto__: null,
|
|
6037
|
-
down:
|
|
6038
|
-
up:
|
|
6061
|
+
down: yu,
|
|
6062
|
+
up: wu
|
|
6039
6063
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6040
|
-
async function
|
|
6064
|
+
async function Cu(e) {
|
|
6041
6065
|
await e.schema.createTable("custom_text").addColumn(
|
|
6042
6066
|
"tenant_id",
|
|
6043
6067
|
"varchar(191)",
|
|
@@ -6048,26 +6072,26 @@ async function vu(e) {
|
|
|
6048
6072
|
"language"
|
|
6049
6073
|
]).execute();
|
|
6050
6074
|
}
|
|
6051
|
-
async function
|
|
6075
|
+
async function xu(e) {
|
|
6052
6076
|
await e.schema.dropTable("custom_text").execute();
|
|
6053
6077
|
}
|
|
6054
|
-
const
|
|
6078
|
+
const Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6055
6079
|
__proto__: null,
|
|
6056
|
-
down:
|
|
6057
|
-
up:
|
|
6080
|
+
down: xu,
|
|
6081
|
+
up: Cu
|
|
6058
6082
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6059
|
-
async function
|
|
6083
|
+
async function Nu(e) {
|
|
6060
6084
|
await e.schema.alterTable("tenants").addColumn("mfa", "text").execute();
|
|
6061
6085
|
}
|
|
6062
|
-
async function
|
|
6086
|
+
async function bu(e) {
|
|
6063
6087
|
await e.schema.alterTable("tenants").dropColumn("mfa").execute();
|
|
6064
6088
|
}
|
|
6065
|
-
const
|
|
6089
|
+
const Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6066
6090
|
__proto__: null,
|
|
6067
|
-
down:
|
|
6068
|
-
up:
|
|
6091
|
+
down: bu,
|
|
6092
|
+
up: Nu
|
|
6069
6093
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6070
|
-
async function
|
|
6094
|
+
async function Ou(e) {
|
|
6071
6095
|
try {
|
|
6072
6096
|
return await h`SELECT VERSION()`.execute(e), "mysql";
|
|
6073
6097
|
} catch {
|
|
@@ -6087,8 +6111,8 @@ async function Q(e, t, a, n) {
|
|
|
6087
6111
|
throw o;
|
|
6088
6112
|
}
|
|
6089
6113
|
}
|
|
6090
|
-
async function
|
|
6091
|
-
const t = await
|
|
6114
|
+
async function ku(e) {
|
|
6115
|
+
const t = await Ou(e);
|
|
6092
6116
|
await Q(e, "hooks", "template_id", "text"), await Q(e, "hooks", "created_at_ts", "bigint"), await Q(e, "hooks", "updated_at_ts", "bigint"), t === "mysql" ? await h`
|
|
6093
6117
|
UPDATE hooks
|
|
6094
6118
|
SET created_at_ts = UNIX_TIMESTAMP(created_at) * 1000,
|
|
@@ -6110,13 +6134,13 @@ async function H(e, t, a) {
|
|
|
6110
6134
|
throw n;
|
|
6111
6135
|
}
|
|
6112
6136
|
}
|
|
6113
|
-
async function
|
|
6137
|
+
async function $u(e) {
|
|
6114
6138
|
await H(e, "hooks", "template_id"), await H(e, "hooks", "created_at_ts"), await H(e, "hooks", "updated_at_ts");
|
|
6115
6139
|
}
|
|
6116
|
-
const
|
|
6140
|
+
const Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6117
6141
|
__proto__: null,
|
|
6118
|
-
down:
|
|
6119
|
-
up:
|
|
6142
|
+
down: $u,
|
|
6143
|
+
up: ku
|
|
6120
6144
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6121
6145
|
async function Ce(e) {
|
|
6122
6146
|
try {
|
|
@@ -6139,7 +6163,7 @@ async function se(e, t, a) {
|
|
|
6139
6163
|
throw n;
|
|
6140
6164
|
}
|
|
6141
6165
|
}
|
|
6142
|
-
async function
|
|
6166
|
+
async function Iu(e) {
|
|
6143
6167
|
var r, s, i, d, u;
|
|
6144
6168
|
const t = await Ce(e);
|
|
6145
6169
|
console.log(
|
|
@@ -6178,7 +6202,7 @@ async function Eu(e) {
|
|
|
6178
6202
|
(c) => c.notNull().primaryKey()
|
|
6179
6203
|
).execute(), await e.schema.alterTable("hooks").modifyColumn("form_id", "varchar(128)").execute(), await e.schema.alterTable("hooks").modifyColumn("template_id", "varchar(64)").execute());
|
|
6180
6204
|
}
|
|
6181
|
-
async function
|
|
6205
|
+
async function zu(e) {
|
|
6182
6206
|
const t = await Ce(e);
|
|
6183
6207
|
await e.schema.alterTable("hooks").addColumn("created_at", "varchar(255)").execute(), await e.schema.alterTable("hooks").addColumn("updated_at", "varchar(255)").execute(), t === "mysql" ? await h`
|
|
6184
6208
|
UPDATE hooks
|
|
@@ -6196,12 +6220,12 @@ async function Iu(e) {
|
|
|
6196
6220
|
(a) => a.notNull().primaryKey()
|
|
6197
6221
|
).execute(), await e.schema.alterTable("hooks").modifyColumn("form_id", "text").execute(), await e.schema.alterTable("hooks").modifyColumn("template_id", "text").execute());
|
|
6198
6222
|
}
|
|
6199
|
-
const
|
|
6223
|
+
const Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6200
6224
|
__proto__: null,
|
|
6201
|
-
down:
|
|
6202
|
-
up:
|
|
6225
|
+
down: zu,
|
|
6226
|
+
up: Iu
|
|
6203
6227
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6204
|
-
async function
|
|
6228
|
+
async function Du(e) {
|
|
6205
6229
|
const { rows: t } = await h`
|
|
6206
6230
|
SELECT username, provider, tenant_id, COUNT(*) AS cnt
|
|
6207
6231
|
FROM users
|
|
@@ -6237,24 +6261,24 @@ async function Pu(e) {
|
|
|
6237
6261
|
}
|
|
6238
6262
|
await e.schema.createIndex("unique_username_provider").on("users").unique().columns(["username", "provider", "tenant_id"]).execute();
|
|
6239
6263
|
}
|
|
6240
|
-
async function
|
|
6264
|
+
async function Au(e) {
|
|
6241
6265
|
await e.schema.dropIndex("unique_username_provider").execute();
|
|
6242
6266
|
}
|
|
6243
|
-
const
|
|
6267
|
+
const ju = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6244
6268
|
__proto__: null,
|
|
6245
|
-
down:
|
|
6246
|
-
up:
|
|
6269
|
+
down: Au,
|
|
6270
|
+
up: Du
|
|
6247
6271
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6248
|
-
async function
|
|
6272
|
+
async function Fu(e) {
|
|
6249
6273
|
await e.schema.alterTable("refresh_tokens").addColumn("login_id", "varchar(26)").execute(), await e.schema.createIndex("idx_refresh_tokens_login_id").on("refresh_tokens").column("login_id").execute();
|
|
6250
6274
|
}
|
|
6251
|
-
async function
|
|
6275
|
+
async function Ru(e) {
|
|
6252
6276
|
await e.schema.dropIndex("idx_refresh_tokens_login_id").execute(), await e.schema.alterTable("refresh_tokens").dropColumn("login_id").execute();
|
|
6253
6277
|
}
|
|
6254
|
-
const
|
|
6278
|
+
const Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6255
6279
|
__proto__: null,
|
|
6256
|
-
down:
|
|
6257
|
-
up:
|
|
6280
|
+
down: Ru,
|
|
6281
|
+
up: Fu
|
|
6258
6282
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6259
6283
|
async function xe(e) {
|
|
6260
6284
|
try {
|
|
@@ -6263,99 +6287,99 @@ async function xe(e) {
|
|
|
6263
6287
|
return "sqlite";
|
|
6264
6288
|
}
|
|
6265
6289
|
}
|
|
6266
|
-
async function
|
|
6290
|
+
async function Ju(e) {
|
|
6267
6291
|
await xe(e) === "mysql" ? (await e.schema.alterTable("refresh_tokens").modifyColumn("login_id", "varchar(26)", (a) => a.notNull()).execute(), await e.schema.dropIndex("idx_refresh_tokens_session_id").execute(), await e.schema.alterTable("refresh_tokens").dropColumn("session_id").execute()) : (await e.schema.dropIndex("idx_refresh_tokens_session_id").execute(), await e.schema.alterTable("refresh_tokens").dropColumn("session_id").execute());
|
|
6268
6292
|
}
|
|
6269
|
-
async function
|
|
6293
|
+
async function Lu(e) {
|
|
6270
6294
|
await xe(e) === "mysql" ? (await e.schema.alterTable("refresh_tokens").addColumn("session_id", "varchar(26)").execute(), await e.schema.createIndex("idx_refresh_tokens_session_id").on("refresh_tokens").column("session_id").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("login_id", "varchar(26)").execute()) : await e.schema.alterTable("refresh_tokens").addColumn("session_id", "varchar(21)").execute();
|
|
6271
6295
|
}
|
|
6272
|
-
const
|
|
6296
|
+
const Ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6273
6297
|
__proto__: null,
|
|
6274
|
-
down:
|
|
6275
|
-
up:
|
|
6298
|
+
down: Lu,
|
|
6299
|
+
up: Ju
|
|
6276
6300
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6277
|
-
async function
|
|
6301
|
+
async function qu(e) {
|
|
6278
6302
|
await e.schema.createIndex("idx_sessions_idle_expires_at_ts").on("sessions").column("idle_expires_at_ts").execute(), await e.schema.createIndex("idx_refresh_tokens_idle_expires_at_ts").on("refresh_tokens").column("idle_expires_at_ts").execute();
|
|
6279
6303
|
}
|
|
6280
|
-
async function
|
|
6304
|
+
async function Bu(e) {
|
|
6281
6305
|
await e.schema.dropIndex("idx_sessions_idle_expires_at_ts").on("sessions").execute(), await e.schema.dropIndex("idx_refresh_tokens_idle_expires_at_ts").on("refresh_tokens").execute();
|
|
6282
6306
|
}
|
|
6283
|
-
const
|
|
6307
|
+
const Uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6284
6308
|
__proto__: null,
|
|
6285
|
-
down:
|
|
6286
|
-
up:
|
|
6309
|
+
down: Bu,
|
|
6310
|
+
up: qu
|
|
6287
6311
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6288
|
-
async function
|
|
6312
|
+
async function Qu(e) {
|
|
6289
6313
|
await e.schema.alterTable("login_sessions").addColumn("auth_connection", "varchar(255)").execute();
|
|
6290
6314
|
}
|
|
6291
|
-
async function
|
|
6315
|
+
async function Hu(e) {
|
|
6292
6316
|
await e.schema.alterTable("login_sessions").dropColumn("auth_connection").execute();
|
|
6293
6317
|
}
|
|
6294
|
-
const
|
|
6318
|
+
const Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6295
6319
|
__proto__: null,
|
|
6296
|
-
down:
|
|
6297
|
-
up:
|
|
6320
|
+
down: Hu,
|
|
6321
|
+
up: Qu
|
|
6298
6322
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6299
|
-
async function
|
|
6323
|
+
async function Wu(e) {
|
|
6300
6324
|
await e.schema.createTable("mfa_enrollments").addColumn("id", "varchar(26)", (t) => t.primaryKey()).addColumn(
|
|
6301
6325
|
"tenant_id",
|
|
6302
6326
|
"varchar(191)",
|
|
6303
6327
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
6304
6328
|
).addColumn("user_id", "varchar(255)", (t) => t.notNull()).addColumn("type", "varchar(32)", (t) => t.notNull()).addColumn("phone_number", "varchar(32)").addColumn("totp_secret", "varchar(255)").addColumn("confirmed", "integer", (t) => t.notNull().defaultTo(0)).addColumn("created_at_ts", "bigint", (t) => t.notNull()).addColumn("updated_at_ts", "bigint", (t) => t.notNull()).execute(), await e.schema.createIndex("mfa_enrollments_tenant_user_idx").on("mfa_enrollments").columns(["tenant_id", "user_id"]).execute();
|
|
6305
6329
|
}
|
|
6306
|
-
async function
|
|
6330
|
+
async function Gu(e) {
|
|
6307
6331
|
await e.schema.dropTable("mfa_enrollments").execute();
|
|
6308
6332
|
}
|
|
6309
|
-
const
|
|
6333
|
+
const Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6310
6334
|
__proto__: null,
|
|
6311
|
-
down:
|
|
6312
|
-
up:
|
|
6335
|
+
down: Gu,
|
|
6336
|
+
up: Wu
|
|
6313
6337
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6314
|
-
async function
|
|
6338
|
+
async function Xu(e) {
|
|
6315
6339
|
await e.schema.alterTable("codes").addColumn("otp", "varchar(32)").execute();
|
|
6316
6340
|
}
|
|
6317
|
-
async function
|
|
6341
|
+
async function Zu(e) {
|
|
6318
6342
|
await e.schema.alterTable("codes").dropColumn("otp").execute();
|
|
6319
6343
|
}
|
|
6320
|
-
const
|
|
6344
|
+
const e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6321
6345
|
__proto__: null,
|
|
6322
|
-
down:
|
|
6323
|
-
up:
|
|
6346
|
+
down: Zu,
|
|
6347
|
+
up: Xu
|
|
6324
6348
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6325
|
-
async function
|
|
6349
|
+
async function t_(e) {
|
|
6326
6350
|
await e.schema.alterTable("mfa_enrollments").renameTo("authentication_methods").execute(), await e.schema.alterTable("authentication_methods").addColumn("credential_id", "varchar(512)").execute(), await e.schema.alterTable("authentication_methods").addColumn("public_key", "text").execute(), await e.schema.alterTable("authentication_methods").addColumn("sign_count", "integer").execute(), await e.schema.alterTable("authentication_methods").addColumn("credential_backed_up", "integer").execute(), await e.schema.alterTable("authentication_methods").addColumn("transports", "varchar(512)").execute(), await e.schema.alterTable("authentication_methods").addColumn("friendly_name", "varchar(255)").execute(), await e.schema.createIndex("authentication_methods_credential_id_idx").on("authentication_methods").column("credential_id").execute();
|
|
6327
6351
|
}
|
|
6328
|
-
async function
|
|
6352
|
+
async function a_(e) {
|
|
6329
6353
|
await e.schema.dropIndex("authentication_methods_credential_id_idx").execute(), await e.schema.alterTable("authentication_methods").dropColumn("friendly_name").execute(), await e.schema.alterTable("authentication_methods").dropColumn("transports").execute(), await e.schema.alterTable("authentication_methods").dropColumn("credential_backed_up").execute(), await e.schema.alterTable("authentication_methods").dropColumn("sign_count").execute(), await e.schema.alterTable("authentication_methods").dropColumn("public_key").execute(), await e.schema.alterTable("authentication_methods").dropColumn("credential_id").execute(), await e.schema.alterTable("authentication_methods").renameTo("mfa_enrollments").execute();
|
|
6330
6354
|
}
|
|
6331
|
-
const
|
|
6355
|
+
const n_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6332
6356
|
__proto__: null,
|
|
6333
|
-
down:
|
|
6334
|
-
up:
|
|
6357
|
+
down: a_,
|
|
6358
|
+
up: t_
|
|
6335
6359
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6336
|
-
async function
|
|
6360
|
+
async function o_(e) {
|
|
6337
6361
|
await e.schema.createTable("outbox_events").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("event_type", "varchar(255)", (t) => t.notNull()).addColumn("log_type", "varchar(64)", (t) => t.notNull()).addColumn("aggregate_type", "varchar(64)", (t) => t.notNull()).addColumn("aggregate_id", "varchar(255)", (t) => t.notNull()).addColumn("payload", "text", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("processed_at", "varchar(35)").addColumn("retry_count", "integer", (t) => t.notNull().defaultTo(0)).addColumn("next_retry_at", "varchar(35)").addColumn("error", "text").execute(), await e.schema.createIndex("idx_outbox_unprocessed").on("outbox_events").columns(["processed_at", "created_at"]).execute(), await e.schema.createIndex("idx_outbox_tenant_type").on("outbox_events").columns(["tenant_id", "event_type", "created_at"]).execute();
|
|
6338
6362
|
}
|
|
6339
|
-
async function
|
|
6363
|
+
async function r_(e) {
|
|
6340
6364
|
await e.schema.dropTable("outbox_events").execute();
|
|
6341
6365
|
}
|
|
6342
|
-
const
|
|
6366
|
+
const s_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6343
6367
|
__proto__: null,
|
|
6344
|
-
down:
|
|
6345
|
-
up:
|
|
6368
|
+
down: r_,
|
|
6369
|
+
up: o_
|
|
6346
6370
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6347
|
-
async function
|
|
6371
|
+
async function i_(e) {
|
|
6348
6372
|
await e.schema.alterTable("outbox_events").addColumn("claimed_by", "varchar(64)").execute(), await e.schema.alterTable("outbox_events").addColumn("claim_expires_at", "varchar(35)").execute();
|
|
6349
6373
|
}
|
|
6350
|
-
async function
|
|
6374
|
+
async function c_(e) {
|
|
6351
6375
|
await e.schema.alterTable("outbox_events").dropColumn("claimed_by").execute(), await e.schema.alterTable("outbox_events").dropColumn("claim_expires_at").execute();
|
|
6352
6376
|
}
|
|
6353
|
-
const
|
|
6377
|
+
const l_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6354
6378
|
__proto__: null,
|
|
6355
|
-
down:
|
|
6356
|
-
up:
|
|
6379
|
+
down: c_,
|
|
6380
|
+
up: i_
|
|
6357
6381
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6358
|
-
async function
|
|
6382
|
+
async function d_(e) {
|
|
6359
6383
|
await e.schema.createIndex("idx_outbox_claim").on("outbox_events").columns([
|
|
6360
6384
|
"processed_at",
|
|
6361
6385
|
"claim_expires_at",
|
|
@@ -6363,156 +6387,156 @@ async function l_(e) {
|
|
|
6363
6387
|
"created_at"
|
|
6364
6388
|
]).execute();
|
|
6365
6389
|
}
|
|
6366
|
-
async function
|
|
6390
|
+
async function u_(e) {
|
|
6367
6391
|
await e.schema.dropIndex("idx_outbox_claim").on("outbox_events").execute();
|
|
6368
6392
|
}
|
|
6369
|
-
const
|
|
6393
|
+
const __ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6370
6394
|
__proto__: null,
|
|
6371
|
-
down:
|
|
6372
|
-
up:
|
|
6395
|
+
down: u_,
|
|
6396
|
+
up: d_
|
|
6373
6397
|
}, Symbol.toStringTag, { value: "Module" })), Te = {
|
|
6374
|
-
m1_init:
|
|
6375
|
-
m2_magicLink:
|
|
6376
|
-
m3_updateAt:
|
|
6377
|
-
m4_logTable:
|
|
6378
|
-
m5_userProfile:
|
|
6379
|
-
m6_sessions:
|
|
6380
|
-
m7_passwords:
|
|
6381
|
-
m8_logsTableNewFields:
|
|
6382
|
-
m9_passwordTableNewField:
|
|
6383
|
-
n01_codesTable:
|
|
6384
|
-
n11_universalLoginSession:
|
|
6385
|
-
n12_userFields:
|
|
6386
|
-
n13_userEmailIndex:
|
|
6387
|
-
n14_profileDataField:
|
|
6388
|
-
n15_userEmailIndex:
|
|
6389
|
-
n16_userLocale:
|
|
6390
|
-
n17_signingKeys:
|
|
6391
|
-
n18_logsFields:
|
|
6392
|
-
n19_connectionsUserinfo:
|
|
6393
|
-
n20_missingFields:
|
|
6394
|
-
n21_sessionDeletedAt:
|
|
6395
|
-
n22_dropLogsFields:
|
|
6396
|
-
n23_dropUsersFields:
|
|
6397
|
-
n24_logsIndexes:
|
|
6398
|
-
n25_logDescMaxLength:
|
|
6399
|
-
n26_logsTableExtraFields:
|
|
6400
|
-
n27_usersTableNameIndex:
|
|
6401
|
-
n28_usersEmailConstrain:
|
|
6402
|
-
n29_increaseOtpStateLength:
|
|
6403
|
-
n30_increaseTicketStateLength:
|
|
6404
|
-
n31_branding:
|
|
6405
|
-
n32_indexesAndNotNull:
|
|
6406
|
-
n33_vendorIdInUniversalLoginSession:
|
|
6407
|
-
n34_auth0ClientInUniversalLoginSession:
|
|
6408
|
-
n35_increaseUniversalSessionStateLength:
|
|
6409
|
-
n36_authenticationCodes:
|
|
6410
|
-
n37_disableSignUps:
|
|
6411
|
-
n38_otpIpAddress:
|
|
6412
|
-
n39_increaseUserAgentLength:
|
|
6413
|
-
n40_userId:
|
|
6414
|
-
n41_hooks:
|
|
6415
|
-
n42_userIdIndexes:
|
|
6416
|
-
n43_userIdIndexes:
|
|
6417
|
-
n44_codes:
|
|
6418
|
-
n45_hookProperties:
|
|
6419
|
-
n46_loginAuth0Client:
|
|
6420
|
-
n47_loginAuth0Client:
|
|
6421
|
-
n48_saml:
|
|
6422
|
-
n49_removeFields:
|
|
6423
|
-
n50_authParamsNonce:
|
|
6424
|
-
n51_connectionid:
|
|
6425
|
-
n52_cert:
|
|
6426
|
-
n53_codes_primary_key:
|
|
6427
|
-
n54_cleanup_tables:
|
|
6428
|
-
n55_logs_index:
|
|
6429
|
-
n56_application_fields:
|
|
6430
|
-
n57_prompt_settings:
|
|
6431
|
-
n58_connection_client_id:
|
|
6432
|
-
n59_connection_options:
|
|
6433
|
-
n60_users_metadata:
|
|
6434
|
-
n61_userLocales:
|
|
6435
|
-
n62_prompt:
|
|
6436
|
-
n63_connection_cleanup:
|
|
6437
|
-
n64_act_as:
|
|
6438
|
-
n65_code_verifier:
|
|
6439
|
-
n66_email_providers:
|
|
6440
|
-
n67_drop_tickets:
|
|
6441
|
-
n68_login_useragents:
|
|
6442
|
-
n70_refresh_tokens:
|
|
6443
|
-
n71_session_new_fields:
|
|
6444
|
-
n72_session_primary_key:
|
|
6445
|
-
n73_drop_sessions:
|
|
6446
|
-
n74_custom_domains:
|
|
6447
|
-
n75_organizations:
|
|
6448
|
-
n76_authorization_url_length:
|
|
6449
|
-
n77_drop_sessions:
|
|
6450
|
-
n78_login_sessions:
|
|
6451
|
-
n79_drop_sessions_2:
|
|
6452
|
-
n80_recreate_custom_domains:
|
|
6453
|
-
n81_phone:
|
|
6454
|
-
n82_forms:
|
|
6455
|
-
n83_addFormsIdToHooks:
|
|
6456
|
-
n84_login_completed:
|
|
6457
|
-
n85_add_login_session_id_to_sessions:
|
|
6458
|
-
n86_index_sessions_login_session_id:
|
|
6459
|
-
n87_code_challenge:
|
|
6460
|
-
n88_add_redirect_uri_to_codes:
|
|
6461
|
-
n89_add_nonce_and_state_to_codes:
|
|
6462
|
-
n90_themes:
|
|
6463
|
-
n91_resource_servers_rules_permissions:
|
|
6464
|
-
n92_role_permissions:
|
|
6465
|
-
n93_add_permissions_to_roles:
|
|
6466
|
-
n94_keys_connection_and_extend_columns:
|
|
6467
|
-
n95_create_organizations_table:
|
|
6468
|
-
n96_create_user_organizations_table:
|
|
6469
|
-
n97_add_organization_to_user_permissions_and_roles:
|
|
6470
|
-
n98_clients:
|
|
6471
|
-
n99_update_client_foreign_keys:
|
|
6472
|
-
o001_client_grants:
|
|
6473
|
-
o002_drop_applications:
|
|
6474
|
-
o003_phone_number_index:
|
|
6475
|
-
o004_login_sessions_id_index:
|
|
6476
|
-
o005_connections_tenant_index:
|
|
6477
|
-
o006_remove_redundant_user_organizations_tenant_index:
|
|
6478
|
-
o007_tenant_settings:
|
|
6479
|
-
o008_merge_tenant_settings_into_tenants:
|
|
6480
|
-
o009_create_invites_table:
|
|
6481
|
-
o010_add_log_id_to_logs:
|
|
6482
|
-
o011_add_location_info_to_logs:
|
|
6483
|
-
o012_add_password_history:
|
|
6484
|
-
o013_connection_display_name:
|
|
6485
|
-
o014_client_connections:
|
|
6486
|
-
o015_flows:
|
|
6487
|
-
o016_add_is_system_column:
|
|
6488
|
-
o017_connections_composite_key:
|
|
6489
|
-
o018_login_session_state:
|
|
6490
|
-
o019_roles_resource_servers_metadata:
|
|
6491
|
-
o020_session_add_timestamp_columns:
|
|
6492
|
-
o021_session_cleanup_and_ulid:
|
|
6493
|
-
o022_oidc_profile_claims:
|
|
6494
|
-
o023_preferred_username:
|
|
6495
|
-
o024_user_address:
|
|
6496
|
-
o025_authparams_max_age:
|
|
6497
|
-
o026_auth0_conformant:
|
|
6498
|
-
o027_universal_login_templates:
|
|
6499
|
-
o028_custom_text:
|
|
6500
|
-
o029_guardian_mfa:
|
|
6501
|
-
o030_add_template_id_to_hooks:
|
|
6502
|
-
o031_hooks_cleanup:
|
|
6503
|
-
o032_unique_username_provider:
|
|
6504
|
-
o033_add_login_id_to_refresh_tokens:
|
|
6505
|
-
o034_refresh_tokens_replace_session_id_with_login_id:
|
|
6506
|
-
o035_idle_expires_at_ts_indexes:
|
|
6507
|
-
o036_add_connection_to_login_sessions:
|
|
6508
|
-
o037_mfa_enrollments:
|
|
6509
|
-
o038_add_otp_to_codes:
|
|
6510
|
-
o039_rename_mfa_enrollments_to_authentication_methods:
|
|
6511
|
-
o040_create_outbox_events:
|
|
6512
|
-
o041_add_outbox_claim_columns:
|
|
6513
|
-
o042_add_outbox_claim_index:
|
|
6398
|
+
m1_init: Co,
|
|
6399
|
+
m2_magicLink: No,
|
|
6400
|
+
m3_updateAt: Oo,
|
|
6401
|
+
m4_logTable: Eo,
|
|
6402
|
+
m5_userProfile: Po,
|
|
6403
|
+
m6_sessions: jo,
|
|
6404
|
+
m7_passwords: Mo,
|
|
6405
|
+
m8_logsTableNewFields: Ko,
|
|
6406
|
+
m9_passwordTableNewField: Uo,
|
|
6407
|
+
n01_codesTable: Yo,
|
|
6408
|
+
n11_universalLoginSession: Vo,
|
|
6409
|
+
n12_userFields: er,
|
|
6410
|
+
n13_userEmailIndex: nr,
|
|
6411
|
+
n14_profileDataField: sr,
|
|
6412
|
+
n15_userEmailIndex: lr,
|
|
6413
|
+
n16_userLocale: _r,
|
|
6414
|
+
n17_signingKeys: pr,
|
|
6415
|
+
n18_logsFields: wr,
|
|
6416
|
+
n19_connectionsUserinfo: Cr,
|
|
6417
|
+
n20_missingFields: Nr,
|
|
6418
|
+
n21_sessionDeletedAt: Or,
|
|
6419
|
+
n22_dropLogsFields: Er,
|
|
6420
|
+
n23_dropUsersFields: Pr,
|
|
6421
|
+
n24_logsIndexes: jr,
|
|
6422
|
+
n25_logDescMaxLength: Mr,
|
|
6423
|
+
n26_logsTableExtraFields: Kr,
|
|
6424
|
+
n27_usersTableNameIndex: Ur,
|
|
6425
|
+
n28_usersEmailConstrain: Yr,
|
|
6426
|
+
n29_increaseOtpStateLength: Vr,
|
|
6427
|
+
n30_increaseTicketStateLength: es,
|
|
6428
|
+
n31_branding: ns,
|
|
6429
|
+
n32_indexesAndNotNull: ss,
|
|
6430
|
+
n33_vendorIdInUniversalLoginSession: ls,
|
|
6431
|
+
n34_auth0ClientInUniversalLoginSession: _s,
|
|
6432
|
+
n35_increaseUniversalSessionStateLength: ps,
|
|
6433
|
+
n36_authenticationCodes: ws,
|
|
6434
|
+
n37_disableSignUps: Cs,
|
|
6435
|
+
n38_otpIpAddress: Ns,
|
|
6436
|
+
n39_increaseUserAgentLength: Os,
|
|
6437
|
+
n40_userId: Es,
|
|
6438
|
+
n41_hooks: Ps,
|
|
6439
|
+
n42_userIdIndexes: js,
|
|
6440
|
+
n43_userIdIndexes: Ms,
|
|
6441
|
+
n44_codes: Ks,
|
|
6442
|
+
n45_hookProperties: Us,
|
|
6443
|
+
n46_loginAuth0Client: Ys,
|
|
6444
|
+
n47_loginAuth0Client: Vs,
|
|
6445
|
+
n48_saml: ei,
|
|
6446
|
+
n49_removeFields: ni,
|
|
6447
|
+
n50_authParamsNonce: si,
|
|
6448
|
+
n51_connectionid: li,
|
|
6449
|
+
n52_cert: _i,
|
|
6450
|
+
n53_codes_primary_key: pi,
|
|
6451
|
+
n54_cleanup_tables: wi,
|
|
6452
|
+
n55_logs_index: Ci,
|
|
6453
|
+
n56_application_fields: Ni,
|
|
6454
|
+
n57_prompt_settings: Oi,
|
|
6455
|
+
n58_connection_client_id: Ei,
|
|
6456
|
+
n59_connection_options: Pi,
|
|
6457
|
+
n60_users_metadata: ji,
|
|
6458
|
+
n61_userLocales: Mi,
|
|
6459
|
+
n62_prompt: Ki,
|
|
6460
|
+
n63_connection_cleanup: Ui,
|
|
6461
|
+
n64_act_as: Yi,
|
|
6462
|
+
n65_code_verifier: Vi,
|
|
6463
|
+
n66_email_providers: ec,
|
|
6464
|
+
n67_drop_tickets: nc,
|
|
6465
|
+
n68_login_useragents: sc,
|
|
6466
|
+
n70_refresh_tokens: lc,
|
|
6467
|
+
n71_session_new_fields: _c,
|
|
6468
|
+
n72_session_primary_key: pc,
|
|
6469
|
+
n73_drop_sessions: wc,
|
|
6470
|
+
n74_custom_domains: Cc,
|
|
6471
|
+
n75_organizations: Nc,
|
|
6472
|
+
n76_authorization_url_length: Oc,
|
|
6473
|
+
n77_drop_sessions: Ec,
|
|
6474
|
+
n78_login_sessions: Pc,
|
|
6475
|
+
n79_drop_sessions_2: jc,
|
|
6476
|
+
n80_recreate_custom_domains: Mc,
|
|
6477
|
+
n81_phone: Kc,
|
|
6478
|
+
n82_forms: Uc,
|
|
6479
|
+
n83_addFormsIdToHooks: Yc,
|
|
6480
|
+
n84_login_completed: Vc,
|
|
6481
|
+
n85_add_login_session_id_to_sessions: el,
|
|
6482
|
+
n86_index_sessions_login_session_id: nl,
|
|
6483
|
+
n87_code_challenge: sl,
|
|
6484
|
+
n88_add_redirect_uri_to_codes: ll,
|
|
6485
|
+
n89_add_nonce_and_state_to_codes: _l,
|
|
6486
|
+
n90_themes: pl,
|
|
6487
|
+
n91_resource_servers_rules_permissions: wl,
|
|
6488
|
+
n92_role_permissions: Cl,
|
|
6489
|
+
n93_add_permissions_to_roles: Nl,
|
|
6490
|
+
n94_keys_connection_and_extend_columns: Ol,
|
|
6491
|
+
n95_create_organizations_table: El,
|
|
6492
|
+
n96_create_user_organizations_table: Pl,
|
|
6493
|
+
n97_add_organization_to_user_permissions_and_roles: jl,
|
|
6494
|
+
n98_clients: Ml,
|
|
6495
|
+
n99_update_client_foreign_keys: Ql,
|
|
6496
|
+
o001_client_grants: Wl,
|
|
6497
|
+
o002_drop_applications: Xl,
|
|
6498
|
+
o003_phone_number_index: td,
|
|
6499
|
+
o004_login_sessions_id_index: od,
|
|
6500
|
+
o005_connections_tenant_index: id,
|
|
6501
|
+
o006_remove_redundant_user_organizations_tenant_index: dd,
|
|
6502
|
+
o007_tenant_settings: md,
|
|
6503
|
+
o008_merge_tenant_settings_into_tenants: fd,
|
|
6504
|
+
o009_create_invites_table: yd,
|
|
6505
|
+
o010_add_log_id_to_logs: xd,
|
|
6506
|
+
o011_add_location_info_to_logs: bd,
|
|
6507
|
+
o012_add_password_history: kd,
|
|
6508
|
+
o013_connection_display_name: Id,
|
|
6509
|
+
o014_client_connections: Dd,
|
|
6510
|
+
o015_flows: Fd,
|
|
6511
|
+
o016_add_is_system_column: Jd,
|
|
6512
|
+
o017_connections_composite_key: qd,
|
|
6513
|
+
o018_login_session_state: Qd,
|
|
6514
|
+
o019_roles_resource_servers_metadata: Wd,
|
|
6515
|
+
o020_session_add_timestamp_columns: Zd,
|
|
6516
|
+
o021_session_cleanup_and_ulid: au,
|
|
6517
|
+
o022_oidc_profile_claims: ru,
|
|
6518
|
+
o023_preferred_username: cu,
|
|
6519
|
+
o024_user_address: uu,
|
|
6520
|
+
o025_authparams_max_age: hu,
|
|
6521
|
+
o026_auth0_conformant: gu,
|
|
6522
|
+
o027_universal_login_templates: vu,
|
|
6523
|
+
o028_custom_text: Tu,
|
|
6524
|
+
o029_guardian_mfa: Su,
|
|
6525
|
+
o030_add_template_id_to_hooks: Eu,
|
|
6526
|
+
o031_hooks_cleanup: Pu,
|
|
6527
|
+
o032_unique_username_provider: ju,
|
|
6528
|
+
o033_add_login_id_to_refresh_tokens: Mu,
|
|
6529
|
+
o034_refresh_tokens_replace_session_id_with_login_id: Ku,
|
|
6530
|
+
o035_idle_expires_at_ts_indexes: Uu,
|
|
6531
|
+
o036_add_connection_to_login_sessions: Yu,
|
|
6532
|
+
o037_mfa_enrollments: Vu,
|
|
6533
|
+
o038_add_otp_to_codes: e_,
|
|
6534
|
+
o039_rename_mfa_enrollments_to_authentication_methods: n_,
|
|
6535
|
+
o040_create_outbox_events: s_,
|
|
6536
|
+
o041_add_outbox_claim_columns: l_,
|
|
6537
|
+
o042_add_outbox_claim_index: __
|
|
6514
6538
|
};
|
|
6515
|
-
async function
|
|
6539
|
+
async function y_(e, t = !1) {
|
|
6516
6540
|
t && console.log("migrating...");
|
|
6517
6541
|
const a = new we(Te), n = new ce({
|
|
6518
6542
|
db: e,
|
|
@@ -6525,7 +6549,7 @@ async function w_(e, t = !1) {
|
|
|
6525
6549
|
}), o)
|
|
6526
6550
|
throw console.error("failed to migrate"), console.error(o), o;
|
|
6527
6551
|
}
|
|
6528
|
-
async function
|
|
6552
|
+
async function v_(e) {
|
|
6529
6553
|
console.log("migrating...");
|
|
6530
6554
|
const t = new we(Te), a = new ce({
|
|
6531
6555
|
db: e,
|
|
@@ -6536,7 +6560,7 @@ async function y_(e) {
|
|
|
6536
6560
|
}), n)
|
|
6537
6561
|
throw console.error("failed to migrate"), console.error(n), n;
|
|
6538
6562
|
}
|
|
6539
|
-
function
|
|
6563
|
+
function m_(e, t = { useTransactions: !0 }) {
|
|
6540
6564
|
const a = {
|
|
6541
6565
|
branding: ga(e),
|
|
6542
6566
|
clients: Ut(e),
|
|
@@ -6553,7 +6577,7 @@ function __(e, t = { useTransactions: !0 }) {
|
|
|
6553
6577
|
keys: ia(e),
|
|
6554
6578
|
loginSessions: Ja(e),
|
|
6555
6579
|
logs: st(e),
|
|
6556
|
-
authenticationMethods:
|
|
6580
|
+
authenticationMethods: lo(e),
|
|
6557
6581
|
passwords: gt(e),
|
|
6558
6582
|
promptSettings: qa(e),
|
|
6559
6583
|
refreshTokens: en(e),
|
|
@@ -6572,10 +6596,10 @@ function __(e, t = { useTransactions: !0 }) {
|
|
|
6572
6596
|
organizations: Ln(e),
|
|
6573
6597
|
userOrganizations: Yn(e),
|
|
6574
6598
|
stats: ao(e),
|
|
6575
|
-
outbox:
|
|
6599
|
+
outbox: wo(e),
|
|
6576
6600
|
async transaction(n) {
|
|
6577
6601
|
return t.useTransactions === !1 ? n(a) : e.transaction().execute(async (o) => {
|
|
6578
|
-
const r =
|
|
6602
|
+
const r = m_(o, { ...t, useTransactions: !1 });
|
|
6579
6603
|
return n(r);
|
|
6580
6604
|
});
|
|
6581
6605
|
}
|
|
@@ -6583,7 +6607,7 @@ function __(e, t = { useTransactions: !0 }) {
|
|
|
6583
6607
|
return a;
|
|
6584
6608
|
}
|
|
6585
6609
|
export {
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6610
|
+
m_ as default,
|
|
6611
|
+
v_ as migrateDown,
|
|
6612
|
+
y_ as migrateToLatest
|
|
6589
6613
|
};
|