fix: migration error on 2fa (#268)

This commit is contained in:
Charles GTE
2026-04-24 21:42:20 +02:00
committed by GitHub
parent e29846ae25
commit a1ec7dbec2
5 changed files with 201 additions and 198 deletions
+1 -1
View File
@@ -71,7 +71,7 @@
"lucide-react": "^0.553.0", "lucide-react": "^0.553.0",
"minio": "^8.0.7", "minio": "^8.0.7",
"motion": "^12.38.0", "motion": "^12.38.0",
"next": "16.2.1", "next": "16.2.3",
"next-safe-action": "^7.10.8", "next-safe-action": "^7.10.8",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"node-cron": "^4.2.1", "node-cron": "^4.2.1",
+53 -53
View File
@@ -13,10 +13,10 @@ importers:
version: 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0) version: 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0)
'@better-auth/passkey': '@better-auth/passkey':
specifier: ^1.6.2 specifier: ^1.6.2
version: 1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6))(nanostores@1.2.0) version: 1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6))(nanostores@1.2.0)
'@better-auth/sso': '@better-auth/sso':
specifier: ^1.6.2 specifier: ^1.6.2
version: 1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6)) version: 1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6))
'@hookform/resolvers': '@hookform/resolvers':
specifier: ^5.2.2 specifier: ^5.2.2
version: 5.2.2(react-hook-form@7.72.1(react@19.2.5)) version: 5.2.2(react-hook-form@7.72.1(react@19.2.5))
@@ -133,7 +133,7 @@ importers:
version: 6.0.0 version: 6.0.0
better-auth: better-auth:
specifier: 1.6.2 specifier: 1.6.2
version: 1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) version: 1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
class-variance-authority: class-variance-authority:
specifier: ^0.7.1 specifier: ^0.7.1
version: 0.7.1 version: 0.7.1
@@ -177,11 +177,11 @@ importers:
specifier: ^12.38.0 specifier: ^12.38.0
version: 12.38.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) version: 12.38.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
next: next:
specifier: 16.2.1 specifier: 16.2.3
version: 16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) version: 16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
next-safe-action: next-safe-action:
specifier: ^7.10.8 specifier: ^7.10.8
version: 7.10.8(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(zod@4.3.6) version: 7.10.8(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(zod@4.3.6)
next-themes: next-themes:
specifier: ^0.4.6 specifier: ^0.4.6
version: 0.4.6(react-dom@19.2.5(react@19.2.5))(react@19.2.5) version: 0.4.6(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
@@ -1776,8 +1776,8 @@ packages:
'@next/env@15.5.2': '@next/env@15.5.2':
resolution: {integrity: sha512-Qe06ew4zt12LeO6N7j8/nULSOe3fMXE4dM6xgpBQNvdzyK1sv5y4oAP3bq4LamrvGCZtmRYnW8URFCeX5nFgGg==} resolution: {integrity: sha512-Qe06ew4zt12LeO6N7j8/nULSOe3fMXE4dM6xgpBQNvdzyK1sv5y4oAP3bq4LamrvGCZtmRYnW8URFCeX5nFgGg==}
'@next/env@16.2.1': '@next/env@16.2.3':
resolution: {integrity: sha512-n8P/HCkIWW+gVal2Z8XqXJ6aB3J0tuM29OcHpCsobWlChH/SITBs1DFBk/HajgrwDkqqBXPbuUuzgDvUekREPg==} resolution: {integrity: sha512-ZWXyj4uNu4GCWQw9cjRxWlbD+33mcDszIo9iQxFnBX3Wmgq9ulaSJcl6VhuWx5pCWqqD+9W6Wfz7N0lM5lYPMA==}
'@next/eslint-plugin-next@16.2.3': '@next/eslint-plugin-next@16.2.3':
resolution: {integrity: sha512-nE/b9mht28XJxjTwKs/yk7w4XTaU3t40UHVAky6cjiijdP/SEy3hGsnQMPxmXPTpC7W4/97okm6fngKnvCqVaA==} resolution: {integrity: sha512-nE/b9mht28XJxjTwKs/yk7w4XTaU3t40UHVAky6cjiijdP/SEy3hGsnQMPxmXPTpC7W4/97okm6fngKnvCqVaA==}
@@ -1788,8 +1788,8 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
'@next/swc-darwin-arm64@16.2.1': '@next/swc-darwin-arm64@16.2.3':
resolution: {integrity: sha512-BwZ8w8YTaSEr2HIuXLMLxIdElNMPvY9fLqb20LX9A9OMGtJilhHLbCL3ggyd0TwjmMcTxi0XXt+ur1vWUoxj2Q==} resolution: {integrity: sha512-u37KDKTKQ+OQLvY+z7SNXixwo4Q2/IAJFDzU1fYe66IbCE51aDSAzkNDkWmLN0yjTUh4BKBd+hb69jYn6qqqSg==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
@@ -1800,8 +1800,8 @@ packages:
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
'@next/swc-darwin-x64@16.2.1': '@next/swc-darwin-x64@16.2.3':
resolution: {integrity: sha512-/vrcE6iQSJq3uL3VGVHiXeaKbn8Es10DGTGRJnRZlkNQQk3kaNtAJg8Y6xuAlrx/6INKVjkfi5rY0iEXorZ6uA==} resolution: {integrity: sha512-gHjL/qy6Q6CG3176FWbAKyKh9IfntKZTB3RY/YOJdDFpHGsUDXVH38U4mMNpHVGXmeYW4wj22dMp1lTfmu/bTQ==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
@@ -1813,8 +1813,8 @@ packages:
os: [linux] os: [linux]
libc: [glibc] libc: [glibc]
'@next/swc-linux-arm64-gnu@16.2.1': '@next/swc-linux-arm64-gnu@16.2.3':
resolution: {integrity: sha512-uLn+0BK+C31LTVbQ/QU+UaVrV0rRSJQ8RfniQAHPghDdgE+SlroYqcmFnO5iNjNfVWCyKZHYrs3Nl0mUzWxbBw==} resolution: {integrity: sha512-U6vtblPtU/P14Y/b/n9ZY0GOxbbIhTFuaFR7F4/uMBidCi2nSdaOFhA0Go81L61Zd6527+yvuX44T4ksnf8T+Q==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
@@ -1827,8 +1827,8 @@ packages:
os: [linux] os: [linux]
libc: [musl] libc: [musl]
'@next/swc-linux-arm64-musl@16.2.1': '@next/swc-linux-arm64-musl@16.2.3':
resolution: {integrity: sha512-ssKq6iMRnHdnycGp9hCuGnXJZ0YPr4/wNwrfE5DbmvEcgl9+yv97/Kq3TPVDfYome1SW5geciLB9aiEqKXQjlQ==} resolution: {integrity: sha512-/YV0LgjHUmfhQpn9bVoGc4x4nan64pkhWR5wyEV8yCOfwwrH630KpvRg86olQHTwHIn1z59uh6JwKvHq1h4QEw==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
@@ -1841,8 +1841,8 @@ packages:
os: [linux] os: [linux]
libc: [glibc] libc: [glibc]
'@next/swc-linux-x64-gnu@16.2.1': '@next/swc-linux-x64-gnu@16.2.3':
resolution: {integrity: sha512-HQm7SrHRELJ30T1TSmT706IWovFFSRGxfgUkyWJZF/RKBMdbdRWJuFrcpDdE5vy9UXjFOx6L3mRdqH04Mmx0hg==} resolution: {integrity: sha512-/HiWEcp+WMZ7VajuiMEFGZ6cg0+aYZPqCJD3YJEfpVWQsKYSjXQG06vJP6F1rdA03COD9Fef4aODs3YxKx+RDQ==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
@@ -1855,8 +1855,8 @@ packages:
os: [linux] os: [linux]
libc: [musl] libc: [musl]
'@next/swc-linux-x64-musl@16.2.1': '@next/swc-linux-x64-musl@16.2.3':
resolution: {integrity: sha512-aV2iUaC/5HGEpbBkE+4B8aHIudoOy5DYekAKOMSHoIYQ66y/wIVeaRx8MS2ZMdxe/HIXlMho4ubdZs/J8441Tg==} resolution: {integrity: sha512-Kt44hGJfZSefebhk/7nIdivoDr3Ugp5+oNz9VvF3GUtfxutucUIHfIO0ZYO8QlOPDQloUVQn4NVC/9JvHRk9hw==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
@@ -1868,8 +1868,8 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
'@next/swc-win32-arm64-msvc@16.2.1': '@next/swc-win32-arm64-msvc@16.2.3':
resolution: {integrity: sha512-IXdNgiDHaSk0ZUJ+xp0OQTdTgnpx1RCfRTalhn3cjOP+IddTMINwA7DXZrwTmGDO8SUr5q2hdP/du4DcrB1GxA==} resolution: {integrity: sha512-O2NZ9ie3Tq6xj5Z5CSwBT3+aWAMW2PIZ4egUi9MaWLkwaehgtB7YZjPm+UpcNpKOme0IQuqDcor7BsW6QBiQBw==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
@@ -1880,8 +1880,8 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@next/swc-win32-x64-msvc@16.2.1': '@next/swc-win32-x64-msvc@16.2.3':
resolution: {integrity: sha512-qvU+3a39Hay+ieIztkGSbF7+mccbbg1Tk25hc4JDylf8IHjYmY/Zm64Qq1602yPyQqvie+vf5T/uPwNxDNIoeg==} resolution: {integrity: sha512-Ibm29/GgB/ab5n7XKqlStkm54qqZE8v2FnijUPBgrd67FWrac45o/RsNlaOWjme/B5UqeWt/8KM4aWBwA1D2Kw==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
@@ -5964,8 +5964,8 @@ packages:
sass: sass:
optional: true optional: true
next@16.2.1: next@16.2.3:
resolution: {integrity: sha512-VaChzNL7o9rbfdt60HUj8tev4m6d7iC1igAy157526+cJlXOQu5LzsBXNT+xaJnTP/k+utSX5vMv7m0G+zKH+Q==} resolution: {integrity: sha512-9V3zV4oZFza3PVev5/poB9g0dEafVcgNyQ8eTRop8GvxZjV2G15FC5ARuG1eFD42QgeYkzJBJzHghNP8Ad9xtA==}
engines: {node: '>=20.9.0'} engines: {node: '>=20.9.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@@ -7861,14 +7861,14 @@ snapshots:
'@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0) '@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0)
'@better-auth/utils': 0.4.0 '@better-auth/utils': 0.4.0
'@better-auth/passkey@1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6))(nanostores@1.2.0)': '@better-auth/passkey@1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6))(nanostores@1.2.0)':
dependencies: dependencies:
'@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0) '@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0)
'@better-auth/utils': 0.4.0 '@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21 '@better-fetch/fetch': 1.1.21
'@simplewebauthn/browser': 13.3.0 '@simplewebauthn/browser': 13.3.0
'@simplewebauthn/server': 13.3.0 '@simplewebauthn/server': 13.3.0
better-auth: 1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) better-auth: 1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
better-call: 1.3.5(zod@4.3.6) better-call: 1.3.5(zod@4.3.6)
nanostores: 1.2.0 nanostores: 1.2.0
zod: 4.3.6 zod: 4.3.6
@@ -7881,12 +7881,12 @@ snapshots:
'@prisma/client': 6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3) '@prisma/client': 6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3)
prisma: 6.7.0(typescript@5.9.3) prisma: 6.7.0(typescript@5.9.3)
'@better-auth/sso@1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6))': '@better-auth/sso@1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(better-call@1.3.5(zod@4.3.6))':
dependencies: dependencies:
'@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0) '@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0)
'@better-auth/utils': 0.4.0 '@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21 '@better-fetch/fetch': 1.1.21
better-auth: 1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) better-auth: 1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
better-call: 1.3.5(zod@4.3.6) better-call: 1.3.5(zod@4.3.6)
fast-xml-parser: 5.5.11 fast-xml-parser: 5.5.11
jose: 6.2.2 jose: 6.2.2
@@ -8728,7 +8728,7 @@ snapshots:
'@next/env@15.5.2': {} '@next/env@15.5.2': {}
'@next/env@16.2.1': {} '@next/env@16.2.3': {}
'@next/eslint-plugin-next@16.2.3': '@next/eslint-plugin-next@16.2.3':
dependencies: dependencies:
@@ -8737,49 +8737,49 @@ snapshots:
'@next/swc-darwin-arm64@15.5.2': '@next/swc-darwin-arm64@15.5.2':
optional: true optional: true
'@next/swc-darwin-arm64@16.2.1': '@next/swc-darwin-arm64@16.2.3':
optional: true optional: true
'@next/swc-darwin-x64@15.5.2': '@next/swc-darwin-x64@15.5.2':
optional: true optional: true
'@next/swc-darwin-x64@16.2.1': '@next/swc-darwin-x64@16.2.3':
optional: true optional: true
'@next/swc-linux-arm64-gnu@15.5.2': '@next/swc-linux-arm64-gnu@15.5.2':
optional: true optional: true
'@next/swc-linux-arm64-gnu@16.2.1': '@next/swc-linux-arm64-gnu@16.2.3':
optional: true optional: true
'@next/swc-linux-arm64-musl@15.5.2': '@next/swc-linux-arm64-musl@15.5.2':
optional: true optional: true
'@next/swc-linux-arm64-musl@16.2.1': '@next/swc-linux-arm64-musl@16.2.3':
optional: true optional: true
'@next/swc-linux-x64-gnu@15.5.2': '@next/swc-linux-x64-gnu@15.5.2':
optional: true optional: true
'@next/swc-linux-x64-gnu@16.2.1': '@next/swc-linux-x64-gnu@16.2.3':
optional: true optional: true
'@next/swc-linux-x64-musl@15.5.2': '@next/swc-linux-x64-musl@15.5.2':
optional: true optional: true
'@next/swc-linux-x64-musl@16.2.1': '@next/swc-linux-x64-musl@16.2.3':
optional: true optional: true
'@next/swc-win32-arm64-msvc@15.5.2': '@next/swc-win32-arm64-msvc@15.5.2':
optional: true optional: true
'@next/swc-win32-arm64-msvc@16.2.1': '@next/swc-win32-arm64-msvc@16.2.3':
optional: true optional: true
'@next/swc-win32-x64-msvc@15.5.2': '@next/swc-win32-x64-msvc@15.5.2':
optional: true optional: true
'@next/swc-win32-x64-msvc@16.2.1': '@next/swc-win32-x64-msvc@16.2.3':
optional: true optional: true
'@noble/ciphers@2.1.1': {} '@noble/ciphers@2.1.1': {}
@@ -11372,7 +11372,7 @@ snapshots:
before-after-hook@4.0.0: {} before-after-hook@4.0.0: {}
better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5): better-auth@1.6.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5):
dependencies: dependencies:
'@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0) '@better-auth/core': 1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0)
'@better-auth/drizzle-adapter': 1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))) '@better-auth/drizzle-adapter': 1.6.2(@better-auth/core@1.6.2(@better-auth/utils@0.4.0)(@better-fetch/fetch@1.1.21)(@opentelemetry/api@1.9.1)(better-call@1.3.5(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0))(@better-auth/utils@0.4.0)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)))
@@ -11395,7 +11395,7 @@ snapshots:
'@prisma/client': 6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3) '@prisma/client': 6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3)
drizzle-kit: 0.31.10 drizzle-kit: 0.31.10
drizzle-orm: 0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3)) drizzle-orm: 0.45.2(@opentelemetry/api@1.9.1)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(@types/pg@8.20.0)(kysely@0.28.15)(pg@8.20.0)(prisma@6.7.0(typescript@5.9.3))
next: 16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) next: 16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
pg: 8.20.0 pg: 8.20.0
prisma: 6.7.0(typescript@5.9.3) prisma: 6.7.0(typescript@5.9.3)
react: 19.2.5 react: 19.2.5
@@ -13608,9 +13608,9 @@ snapshots:
dependencies: dependencies:
type-fest: 2.19.0 type-fest: 2.19.0
next-safe-action@7.10.8(next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(zod@4.3.6): next-safe-action@7.10.8(next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(zod@4.3.6):
dependencies: dependencies:
next: 16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) next: 16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
react: 19.2.5 react: 19.2.5
react-dom: 19.2.5(react@19.2.5) react-dom: 19.2.5(react@19.2.5)
optionalDependencies: optionalDependencies:
@@ -13646,9 +13646,9 @@ snapshots:
- '@babel/core' - '@babel/core'
- babel-plugin-macros - babel-plugin-macros
next@16.2.1(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5): next@16.2.3(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.58.2)(react-dom@19.2.5(react@19.2.5))(react@19.2.5):
dependencies: dependencies:
'@next/env': 16.2.1 '@next/env': 16.2.3
'@swc/helpers': 0.5.15 '@swc/helpers': 0.5.15
baseline-browser-mapping: 2.10.17 baseline-browser-mapping: 2.10.17
caniuse-lite: 1.0.30001787 caniuse-lite: 1.0.30001787
@@ -13657,14 +13657,14 @@ snapshots:
react-dom: 19.2.5(react@19.2.5) react-dom: 19.2.5(react@19.2.5)
styled-jsx: 5.1.6(@babel/core@7.29.0)(react@19.2.5) styled-jsx: 5.1.6(@babel/core@7.29.0)(react@19.2.5)
optionalDependencies: optionalDependencies:
'@next/swc-darwin-arm64': 16.2.1 '@next/swc-darwin-arm64': 16.2.3
'@next/swc-darwin-x64': 16.2.1 '@next/swc-darwin-x64': 16.2.3
'@next/swc-linux-arm64-gnu': 16.2.1 '@next/swc-linux-arm64-gnu': 16.2.3
'@next/swc-linux-arm64-musl': 16.2.1 '@next/swc-linux-arm64-musl': 16.2.3
'@next/swc-linux-x64-gnu': 16.2.1 '@next/swc-linux-x64-gnu': 16.2.3
'@next/swc-linux-x64-musl': 16.2.1 '@next/swc-linux-x64-musl': 16.2.3
'@next/swc-win32-arm64-msvc': 16.2.1 '@next/swc-win32-arm64-msvc': 16.2.3
'@next/swc-win32-x64-msvc': 16.2.1 '@next/swc-win32-x64-msvc': 16.2.3
'@opentelemetry/api': 1.9.1 '@opentelemetry/api': 1.9.1
'@playwright/test': 1.58.2 '@playwright/test': 1.58.2
sharp: 0.34.5 sharp: 0.34.5
@@ -1,165 +1,165 @@
"use client"; "use client";
import { DatabaseBackupActionsModal } from "@/components/wrappers/dashboard/database/backup/actions/backup-actions-modal"; import {DatabaseBackupActionsModal} from "@/components/wrappers/dashboard/database/backup/actions/backup-actions-modal";
import { DatabaseTabs } from "@/components/wrappers/dashboard/projects/database/database-tabs"; import {DatabaseTabs} from "@/components/wrappers/dashboard/projects/database/database-tabs";
import { Setting } from "@/db/schema/01_setting"; import {Setting} from "@/db/schema/01_setting";
import { BackupWith, DatabaseWith, Restoration } from "@/db/schema/07_database"; import {BackupWith, DatabaseWith, Restoration} from "@/db/schema/07_database";
import { MemberWithUser } from "@/db/schema/03_organization"; import {MemberWithUser} from "@/db/schema/03_organization";
import { useBackupModal } from "@/components/wrappers/dashboard/database/backup/backup-modal-context"; import {useBackupModal} from "@/components/wrappers/dashboard/database/backup/backup-modal-context";
import { DatabaseKpi } from "@/components/wrappers/dashboard/projects/database/database-kpi"; import {DatabaseKpi} from "@/components/wrappers/dashboard/projects/database/database-kpi";
import { useQuery } from "@tanstack/react-query"; import {useQuery} from "@tanstack/react-query";
import { getDatabaseDataAction } from "@/components/wrappers/dashboard/database/backup/actions/get-data.action"; import {getDatabaseDataAction} from "@/components/wrappers/dashboard/database/backup/actions/get-data.action";
import { import {
PageContent, PageContent,
PageDescription, PageDescription,
PageTitle, PageTitle,
} from "@/features/layout/page"; } from "@/features/layout/page";
import { capitalizeFirstLetter } from "@/utils/text"; import {capitalizeFirstLetter} from "@/utils/text";
import { RetentionPolicySheet } from "@/components/wrappers/dashboard/database/retention-policy/retention-policy-sheet"; import {RetentionPolicySheet} from "@/components/wrappers/dashboard/database/retention-policy/retention-policy-sheet";
import { CronButton } from "@/components/wrappers/dashboard/database/cron-button/cron-button"; import {CronButton} from "@/components/wrappers/dashboard/database/cron-button/cron-button";
import { ChannelPoliciesModal } from "@/components/wrappers/dashboard/database/channels-policy/policy-modal"; import {ChannelPoliciesModal} from "@/components/wrappers/dashboard/database/channels-policy/policy-modal";
import { HardDrive, Megaphone } from "lucide-react"; import {HardDrive, Megaphone} from "lucide-react";
import { ImportModal } from "@/components/wrappers/dashboard/database/import/import-modal"; import {ImportModal} from "@/components/wrappers/dashboard/database/import/import-modal";
import { BackupButton } from "@/components/wrappers/dashboard/backup/backup-button/backup-button"; import {BackupButton} from "@/components/wrappers/dashboard/backup/backup-button/backup-button";
import {HealthModal} from "@/components/wrappers/dashboard/database/health/health-modal"; import {HealthModal} from "@/components/wrappers/dashboard/database/health/health-modal";
import {HealthcheckLog} from "@/db/schema/15_healthcheck-log"; import {HealthcheckLog} from "@/db/schema/15_healthcheck-log";
export type DatabaseContentProps = { export type DatabaseContentProps = {
settings: Setting; settings: Setting;
backups: BackupWith[]; backups: BackupWith[];
restorations: Restoration[]; restorations: Restoration[];
isAlreadyRestore: boolean; isAlreadyRestore: boolean;
database: DatabaseWith; database: DatabaseWith;
activeMember: MemberWithUser; activeMember: MemberWithUser;
totalBackups: number; totalBackups: number;
availableBackups: number; availableBackups: number;
successRate: number | null; successRate: number | null;
organizationId: string; organizationId: string;
activeOrganizationChannels: any[]; activeOrganizationChannels: any[];
activeOrganizationStorageChannels: any[]; activeOrganizationStorageChannels: any[];
databaseHealthLogs: HealthcheckLog[] databaseHealthLogs: HealthcheckLog[]
}; };
export const DatabaseContent = (props: DatabaseContentProps) => { export const DatabaseContent = (props: DatabaseContentProps) => {
const {} = useBackupModal(); const {} = useBackupModal();
const { data } = useQuery({ const {data} = useQuery({
queryKey: ["database-data", props.database.id], queryKey: ["database-data", props.database.id],
queryFn: async () => { queryFn: async () => {
const result = await getDatabaseDataAction({ const result = await getDatabaseDataAction({
databaseId: props.database.id, databaseId: props.database.id,
}); });
return result?.data; return result?.data;
}, },
initialData: { initialData: {
// TODO : to be patched // TODO : to be patched
// @ts-ignore // @ts-ignore
database: { database: {
...props.database, ...props.database,
project: props.database.project ?? null, project: props.database.project ?? null,
}, },
backups: props.backups, backups: props.backups,
restorations: props.restorations, restorations: props.restorations,
activeOrganizationChannels: props.activeOrganizationChannels, activeOrganizationChannels: props.activeOrganizationChannels,
activeOrganizationStorageChannels: activeOrganizationStorageChannels:
props.activeOrganizationStorageChannels, props.activeOrganizationStorageChannels,
stats: { stats: {
totalBackups: props.totalBackups,
availableBackups: props.availableBackups,
successRate: props.successRate,
},
health: props.databaseHealthLogs
},
staleTime: 0,
gcTime: 0,
refetchInterval: 1000,
});
const database = data?.database ?? props.database;
const backups = data?.backups ?? props.backups;
const restorations = data?.restorations ?? props.restorations;
const activeOrganizationChannels =
data?.activeOrganizationChannels ?? props.activeOrganizationChannels;
const activeOrganizationStorageChannels =
data?.activeOrganizationStorageChannels ??
props.activeOrganizationStorageChannels;
const stats = data?.stats ?? {
totalBackups: props.totalBackups, totalBackups: props.totalBackups,
availableBackups: props.availableBackups, availableBackups: props.availableBackups,
successRate: props.successRate, successRate: props.successRate,
}, };
health: props.databaseHealthLogs
},
staleTime: 0,
gcTime: 0,
refetchInterval: 1000,
});
const database = data?.database ?? props.database; const isAlreadyRestore = restorations.some((r) => r.status === "waiting");
const backups = data?.backups ?? props.backups; const isAlreadyBackup = backups.some(
const restorations = data?.restorations ?? props.restorations; (b) => b.status === "waiting" || b.status === "ongoing",
const activeOrganizationChannels = );
data?.activeOrganizationChannels ?? props.activeOrganizationChannels;
const activeOrganizationStorageChannels =
data?.activeOrganizationStorageChannels ??
props.activeOrganizationStorageChannels;
const stats = data?.stats ?? {
totalBackups: props.totalBackups,
availableBackups: props.availableBackups,
successRate: props.successRate,
};
const isAlreadyRestore = restorations.some((r) => r.status === "waiting"); const isMember = props.activeMember.role === "member";
const isAlreadyBackup = backups.some(
(b) => b.status === "waiting" || b.status === "ongoing",
);
const isMember = props.activeMember.role === "member"; return (
<>
return ( <div className="justify-between gap-2 sm:flex">
<> <PageTitle className="flex flex-col md:flex-row items-center justify-between w-full ">
<div className="justify-between gap-2 sm:flex"> <div className="min-w-full md:min-w-fit ">
<PageTitle className="flex flex-col md:flex-row items-center justify-between w-full "> {capitalizeFirstLetter(database.name)}
<div className="min-w-full md:min-w-fit "> </div>
{capitalizeFirstLetter(database.name)} {!isMember && (
</div> <div className="flex items-center gap-2 md:justify-between w-full ">
{!isMember && ( <div className="flex items-center gap-2">
<div className="flex items-center gap-2 md:justify-between w-full "> <RetentionPolicySheet database={database}/>
<div className="flex items-center gap-2"> <CronButton database={database}/>
<RetentionPolicySheet database={database} /> <ChannelPoliciesModal
<CronButton database={database} /> database={database}
<ChannelPoliciesModal kind={"notification"}
database={database} icon={<Megaphone/>}
kind={"notification"} channels={activeOrganizationChannels}
icon={<Megaphone />} organizationId={props.organizationId}
channels={activeOrganizationChannels} />
organizationId={props.organizationId} <ChannelPoliciesModal
/> database={database}
<ChannelPoliciesModal icon={<HardDrive/>}
database={database} kind={"storage"}
icon={<HardDrive />} channels={activeOrganizationStorageChannels}
kind={"storage"} organizationId={props.organizationId}
channels={activeOrganizationStorageChannels} />
organizationId={props.organizationId} <ImportModal database={database}/>
/> <HealthModal database={database} healthLogs={data?.health ?? []}/>
<ImportModal database={database} /> </div>
<HealthModal database={database} healthLogs={data?.health ?? []}/>
</div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<BackupButton <BackupButton
disable={isAlreadyBackup || !database.lastContact} disable={isAlreadyBackup || !database.lastContact}
databaseId={database.id} databaseId={database.id}
/> />
</div> </div>
</div>
)}
</PageTitle>
</div> </div>
)}
</PageTitle>
</div>
{database.description && ( {database.description && (
<PageDescription className="mt-5 sm:mt-0"> <PageDescription className="mt-5 sm:mt-0">
{database.description} {database.description}
</PageDescription> </PageDescription>
)} )}
<PageContent className="flex flex-col w-full h-full"> <PageContent className="flex flex-col w-full h-full">
<DatabaseKpi <DatabaseKpi
successRate={stats.successRate} successRate={stats.successRate}
database={database} database={database}
availableBackups={stats.availableBackups} availableBackups={stats.availableBackups}
totalBackups={stats.totalBackups} totalBackups={stats.totalBackups}
/> />
<DatabaseBackupActionsModal /> <DatabaseBackupActionsModal/>
<DatabaseTabs <DatabaseTabs
activeMember={props.activeMember} activeMember={props.activeMember}
settings={props.settings} settings={props.settings}
database={database} database={database}
isAlreadyRestore={isAlreadyRestore} isAlreadyRestore={isAlreadyRestore}
backups={backups} backups={backups}
restorations={restorations} restorations={restorations}
/> />
</PageContent> </PageContent>
</> </>
); );
}; };
+4 -1
View File
@@ -1 +1,4 @@
ALTER TABLE "two_factor" ADD COLUMN "verified" boolean NOT NULL; ALTER TABLE "two_factor" ADD COLUMN IF NOT EXISTS "verified" boolean DEFAULT false;
UPDATE "two_factor" SET "verified" = true WHERE "verified" = false;
ALTER TABLE "two_factor" ALTER COLUMN "verified" SET NOT NULL;
ALTER TABLE "two_factor" ALTER COLUMN "verified" DROP DEFAULT;
+1 -1
View File
@@ -13,7 +13,7 @@ import { generateFileUrl } from "@/features/storages/helpers";
import { Readable } from "node:stream"; import { Readable } from "node:stream";
import { env } from "@/env.mjs"; import { env } from "@/env.mjs";
const BASE_DIR = path.join(env.PRIVATE_PATH, "/uploads"); const BASE_DIR = path.join(env.PRIVATE_PATH!, "/uploads");
export async function uploadLocal( export async function uploadLocal(
config: { baseDir?: string }, config: { baseDir?: string },